Update Reference Sources to .NET Framework 4.6.1
[mono.git] / mcs / class / referencesource / System / compmod / system / codedom / CodeTypeOfExpression.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="CodeTypeOfExpression.cs" company="Microsoft">
3 // 
4 // <OWNER>[....]</OWNER>
5 //     Copyright (c) Microsoft Corporation.  All rights reserved.
6 // </copyright>                                                                
7 //------------------------------------------------------------------------------
8
9 namespace System.CodeDom {
10
11     using System.Diagnostics;
12     using System;
13     using Microsoft.Win32;
14     using System.Collections;
15     using System.Runtime.InteropServices;
16
17     /// <devdoc>
18     ///    <para>
19     ///       Represents a TypeOf expression.
20     ///    </para>
21     /// </devdoc>
22     [
23         ClassInterface(ClassInterfaceType.AutoDispatch),
24         ComVisible(true),
25         Serializable,
26     ]
27     public class CodeTypeOfExpression : CodeExpression {
28         private CodeTypeReference type;
29
30         /// <devdoc>
31         ///    <para>
32         ///       Initializes a new instance of <see cref='System.CodeDom.CodeTypeOfExpression'/>.
33         ///    </para>
34         /// </devdoc>
35         public CodeTypeOfExpression() {
36         }
37
38         /// <devdoc>
39         ///    <para>
40         ///       Initializes a new instance of <see cref='System.CodeDom.CodeTypeOfExpression'/>.
41         ///    </para>
42         /// </devdoc>
43         public CodeTypeOfExpression(CodeTypeReference type) {
44             Type = type;
45         }
46
47         /// <devdoc>
48         ///    <para>[To be supplied.]</para>
49         /// </devdoc>
50         public CodeTypeOfExpression(string type) {
51             Type = new CodeTypeReference(type);
52         }
53
54         /// <devdoc>
55         ///    <para>[To be supplied.]</para>
56         /// </devdoc>
57         public CodeTypeOfExpression(Type type) {
58             Type = new CodeTypeReference(type);
59         }
60
61         /// <devdoc>
62         ///    <para>
63         ///       Gets or sets the data type.
64         ///    </para>
65         /// </devdoc>
66         public CodeTypeReference Type {
67             get {
68                 if (type == null) {
69                     type = new CodeTypeReference("");
70                 }
71                 return type;
72             }
73             set {
74                 type = value;
75             }
76         }
77     }
78 }