1 //------------------------------------------------------------------------------
2 // <copyright file="CodeMemberProperty.cs" company="Microsoft">
4 // <OWNER>[....]</OWNER>
5 // Copyright (c) Microsoft Corporation. All rights reserved.
7 //------------------------------------------------------------------------------
9 namespace System.CodeDom {
11 using System.Diagnostics;
13 using Microsoft.Win32;
14 using System.Collections;
15 using System.Runtime.InteropServices;
19 /// Represents a class property.
23 ClassInterface(ClassInterfaceType.AutoDispatch),
27 public class CodeMemberProperty : CodeTypeMember {
28 private CodeTypeReference type;
29 private CodeParameterDeclarationExpressionCollection parameters = new CodeParameterDeclarationExpressionCollection();
32 private CodeStatementCollection getStatements = new CodeStatementCollection();
33 private CodeStatementCollection setStatements = new CodeStatementCollection();
34 private CodeTypeReference privateImplements = null;
35 private CodeTypeReferenceCollection implementationTypes = null;
38 /// <para>[To be supplied.]</para>
40 public CodeTypeReference PrivateImplementationType {
42 return privateImplements;
45 privateImplements = value;
50 /// <para>[To be supplied.]</para>
52 public CodeTypeReferenceCollection ImplementationTypes {
54 if (implementationTypes == null) {
55 implementationTypes = new CodeTypeReferenceCollection();
57 return implementationTypes;
62 /// <para>Gets or sets the data type of the property.</para>
64 public CodeTypeReference Type {
67 type = new CodeTypeReference("");
79 /// indicating whether the property has a get method accessor.
84 return hasGet || getStatements.Count > 0;
89 getStatements.Clear();
97 /// indicating whether the property has a set method accessor.
102 return hasSet || setStatements.Count > 0;
107 setStatements.Clear();
114 /// Gets or sets the collection of get statements for the
118 public CodeStatementCollection GetStatements {
120 return getStatements;
126 /// Gets or sets the collection of get statements for the property.
129 public CodeStatementCollection SetStatements {
131 return setStatements;
137 /// Gets or sets the collection of declaration expressions
142 public CodeParameterDeclarationExpressionCollection Parameters {