2001-10-17 Miguel de Icaza <miguel@ximian.com>
[mono.git] / mcs / mcs / attribute.cs
1 //\r
2 // attribute.cs: Attribute Handler\r
3 //\r
4 // Author: Ravi Pratap (ravi@ximian.com)\r
5 //\r
6 // Licensed under the terms of the GNU GPL\r
7 //\r
8 // (C) 2001 Ximian, Inc (http://www.ximian.com)\r
9 //\r
10 //\r
11 \r
12 using System;\r
13 using System.Collections;\r
14 using System.Reflection;\r
15 using System.Reflection.Emit;\r
16 \r
17 namespace CIR {\r
18 \r
19         public class Attribute {\r
20 \r
21                 public readonly string    Target;\r
22                 public readonly ArrayList AttrParameters;\r
23                 \r
24                 public Attribute (string target, ArrayList attrs)\r
25                 {\r
26                         Target = target;\r
27                         AttrParameters  = attrs;\r
28                 }\r
29 \r
30         }\r
31 \r
32         public class Attributes {\r
33 \r
34                 ArrayList attributes;\r
35 \r
36                 public Attributes (Attribute a)\r
37                 {\r
38                         attributes = new ArrayList ();\r
39                         attributes.Add (a);\r
40 \r
41                 }\r
42 \r
43                 public void AddAttribute (Attribute a)\r
44                 {\r
45                         if (a != null)\r
46                                 attributes.Add (a);\r
47                 }\r
48                 \r
49         }\r
50 }\r