- System.CodeDom review, ns more or less complete now
[mono.git] / mcs / class / System / System.CodeDom / CodeParameterDeclarationExpression.cs
1 //
2 // System.CodeDom CodeParameterDeclarationExpression Class implementation
3 //
4 // Author:
5 //   Miguel de Icaza (miguel@ximian.com)
6 //
7 // (C) 2001 Ximian, Inc.
8 //
9
10 using System.Runtime.InteropServices;
11
12 namespace System.CodeDom
13 {
14         [Serializable]
15         [ClassInterface(ClassInterfaceType.AutoDispatch)]
16         [ComVisible(true)]
17         public class CodeParameterDeclarationExpression
18                 : CodeExpression 
19         {
20                 private CodeAttributeDeclarationCollection customAttributes;
21                 private FieldDirection direction;
22                 private string name;
23                 private CodeTypeReference type;
24
25                 //
26                 // Constructors
27                 //
28                 public CodeParameterDeclarationExpression ()
29                 {
30                 }
31
32                 public CodeParameterDeclarationExpression( CodeTypeReference type, string name )
33                 {
34                         this.type = type;
35                         this.name = name;
36                 }
37
38                 public CodeParameterDeclarationExpression (string type, string name)
39                 {
40                         this.type = new CodeTypeReference( type );
41                         this.name = name;
42                 }
43
44                 public CodeParameterDeclarationExpression (Type type, string name)
45                 {
46                         this.type = new CodeTypeReference( type );
47                         this.name = name;
48                 }
49
50                 //
51                 // Properties
52                 //
53                 public CodeAttributeDeclarationCollection CustomAttributes {
54                         get {
55                                 if ( customAttributes == null )
56                                         customAttributes = new CodeAttributeDeclarationCollection();
57                                 return customAttributes;
58                         }
59                 }
60
61                 public FieldDirection Direction {
62                         get {
63                                 return direction;
64                         }
65                         set {
66                                 direction = value;
67                         }
68                 }
69
70                 public string Name {
71                         get {
72                                 return name;
73                         }
74                         set {
75                                 name = value;
76                         }
77                 }
78
79                 public CodeTypeReference Type {
80                         get {
81                                 return type;
82                         }
83                         set {
84                                 type = value;
85                         }
86                 }
87         }
88 }