2016-08-03 10:59:49 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
// <copyright file="CodePropertyReferenceExpression.cs" company="Microsoft">
|
|
|
|
//
|
2017-08-21 15:34:15 +00:00
|
|
|
// <OWNER>Microsoft</OWNER>
|
2016-08-03 10:59:49 +00:00
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
// </copyright>
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
namespace System.CodeDom {
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System;
|
|
|
|
using Microsoft.Win32;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
/// <devdoc>
|
|
|
|
/// <para>
|
|
|
|
/// Represents a reference to a property.
|
|
|
|
/// </para>
|
|
|
|
/// </devdoc>
|
|
|
|
[
|
|
|
|
ClassInterface(ClassInterfaceType.AutoDispatch),
|
|
|
|
ComVisible(true),
|
|
|
|
Serializable,
|
|
|
|
]
|
|
|
|
public class CodePropertyReferenceExpression : CodeExpression {
|
|
|
|
private CodeExpression targetObject;
|
|
|
|
private string propertyName;
|
2017-04-10 11:41:01 +00:00
|
|
|
#if !MONO
|
2016-08-03 10:59:49 +00:00
|
|
|
private CodeExpressionCollection parameters = new CodeExpressionCollection();
|
2017-04-10 11:41:01 +00:00
|
|
|
#endif
|
2016-08-03 10:59:49 +00:00
|
|
|
|
|
|
|
/// <devdoc>
|
|
|
|
/// <para>
|
|
|
|
/// Initializes a new instance of <see cref='System.CodeDom.CodePropertyReferenceExpression'/>.
|
|
|
|
/// </para>
|
|
|
|
/// </devdoc>
|
|
|
|
public CodePropertyReferenceExpression() {
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <devdoc>
|
|
|
|
/// <para>
|
|
|
|
/// Initializes a new instance of <see cref='System.CodeDom.CodePropertyReferenceExpression'/> using the specified target object and property
|
|
|
|
/// name.
|
|
|
|
/// </para>
|
|
|
|
/// </devdoc>
|
|
|
|
public CodePropertyReferenceExpression(CodeExpression targetObject, string propertyName) {
|
|
|
|
TargetObject = targetObject;
|
|
|
|
PropertyName = propertyName;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <devdoc>
|
|
|
|
/// <para>
|
|
|
|
/// The target object containing the property this <see cref='System.CodeDom.CodePropertyReferenceExpression'/> references.
|
|
|
|
/// </para>
|
|
|
|
/// </devdoc>
|
|
|
|
public CodeExpression TargetObject {
|
|
|
|
get {
|
|
|
|
return targetObject;
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
targetObject = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <devdoc>
|
|
|
|
/// <para>
|
|
|
|
/// The name of the property to reference.
|
|
|
|
/// </para>
|
|
|
|
/// </devdoc>
|
|
|
|
public string PropertyName {
|
|
|
|
get {
|
|
|
|
return (propertyName == null) ? string.Empty : propertyName;
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
propertyName = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|