CodeMemberProperty.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // System.CodeDom CodeMemberProperty Class implementation
  3. //
  4. // Author:
  5. // Miguel de Icaza ([email protected])
  6. // Daniel Stodden ([email protected])
  7. //
  8. // (C) 2001 Ximian, Inc.
  9. //
  10. using System.Runtime.InteropServices;
  11. namespace System.CodeDom
  12. {
  13. [Serializable]
  14. [ClassInterface(ClassInterfaceType.AutoDispatch)]
  15. [ComVisible(true)]
  16. public class CodeMemberProperty
  17. : CodeTypeMember
  18. {
  19. private CodeStatementCollection getStatements;
  20. private bool hasGet;
  21. private bool hasSet;
  22. private CodeTypeReferenceCollection implementationTypes;
  23. private CodeParameterDeclarationExpressionCollection parameters;
  24. private CodeTypeReference privateImplementationType;
  25. private CodeStatementCollection setStatements;
  26. private CodeTypeReference type;
  27. //
  28. // Constructors
  29. //
  30. public CodeMemberProperty ()
  31. {
  32. }
  33. //
  34. // Properties
  35. //
  36. public CodeStatementCollection GetStatements {
  37. get {
  38. if ( getStatements == null )
  39. getStatements = new CodeStatementCollection();
  40. return getStatements;
  41. }
  42. }
  43. public bool HasGet {
  44. get {
  45. return hasGet;
  46. }
  47. set {
  48. hasGet = value;
  49. }
  50. }
  51. public bool HasSet {
  52. get {
  53. return hasSet;
  54. }
  55. set {
  56. hasSet = value;
  57. }
  58. }
  59. public CodeTypeReferenceCollection ImplementationTypes {
  60. get {
  61. if ( implementationTypes == null )
  62. implementationTypes = new CodeTypeReferenceCollection();
  63. return implementationTypes;
  64. }
  65. }
  66. public CodeParameterDeclarationExpressionCollection Parameters {
  67. get {
  68. if ( parameters == null )
  69. parameters = new CodeParameterDeclarationExpressionCollection();
  70. return parameters;
  71. }
  72. }
  73. public CodeTypeReference PrivateImplementationType {
  74. get {
  75. return privateImplementationType;
  76. }
  77. set {
  78. privateImplementationType = value;
  79. }
  80. }
  81. public CodeStatementCollection SetStatements {
  82. get {
  83. if ( setStatements == null )
  84. setStatements = new CodeStatementCollection();
  85. return setStatements;
  86. }
  87. }
  88. public CodeTypeReference Type {
  89. get {
  90. return type;
  91. }
  92. set {
  93. type = value;
  94. }
  95. }
  96. }
  97. }