[RTL]
[reactos.git] / reactos / tools / sysgen / SysGen.BuildEngine / Tasks / RBuild / Base / AuthorBaseTask.cs
1 using System;
2
3 using SysGen.BuildEngine.Attributes;
4 using SysGen.RBuild.Framework;
5
6 namespace SysGen.BuildEngine.Tasks
7 {
8 public abstract class AuthorBaseTask : Task
9 {
10 protected string m_Alias = null;
11 protected RBuildAuthor m_Author = new RBuildAuthor();
12
13 [TaskValue(Required=true)]
14 public virtual string Alias { get { return m_Alias; } set { m_Alias = value; } }
15
16 protected override void ExecuteTask()
17 {
18 m_Author.Contributor = Project.Contributors.GetByName(Alias);
19
20 if (m_Author.Contributor == null)
21 throw new BuildException(string.Format("Could not resolve contributor '{0}' referenced by module '{1}'", Alias, Module.Name, Location));
22
23 Module.Authors.Add(m_Author);
24 }
25 }
26 }