2004-03-31 Rafael Teixeira <rafaelteixeirabr@hotmail.com>
[mono.git] / mcs / class / Mono.GetOptions / AuthorAttribute.cs
1 //
2 // AuthorAttribute.cs
3 //
4 // Author: Rafael Teixeira (rafaelteixeirabr@hotmail.com)
5 //
6 // (C) 2002 Rafael Teixeira
7 //
8 using System;
9
10 namespace Mono
11 {
12         [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)]
13         public class AuthorAttribute : System.Attribute
14         {
15                 public string Name;
16                 public string SubProject;
17
18                 public AuthorAttribute(string name)
19                 {
20                         Name = name;
21                         SubProject = null;
22                 }
23
24                 public AuthorAttribute(string name, string subProject)
25                 {
26                         Name = name;
27                         SubProject = subProject;
28                 }
29
30                 public override string ToString()
31                 {
32                         if (SubProject == null)
33                                 return Name;
34                         else
35                                 return Name + " (" + SubProject + ")"; 
36                 }
37         }
38 }