1 //------------------------------------------------------------------------------
2 // <copyright file="CodePropertyReferenceExpression.cs" company="Microsoft">
4 // <OWNER>Microsoft</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 reference to a property.
23 ClassInterface(ClassInterfaceType.AutoDispatch),
27 public class CodePropertyReferenceExpression : CodeExpression {
28 private CodeExpression targetObject;
29 private string propertyName;
30 private CodeExpressionCollection parameters = new CodeExpressionCollection();
34 /// Initializes a new instance of <see cref='System.CodeDom.CodePropertyReferenceExpression'/>.
37 public CodePropertyReferenceExpression() {
42 /// Initializes a new instance of <see cref='System.CodeDom.CodePropertyReferenceExpression'/> using the specified target object and property
46 public CodePropertyReferenceExpression(CodeExpression targetObject, string propertyName) {
47 TargetObject = targetObject;
48 PropertyName = propertyName;
53 /// The target object containing the property this <see cref='System.CodeDom.CodePropertyReferenceExpression'/> references.
56 public CodeExpression TargetObject {
67 /// The name of the property to reference.
70 public string PropertyName {
72 return (propertyName == null) ? string.Empty : propertyName;