//------------------------------------------------------------------------------
//
//
// Microsoft
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//------------------------------------------------------------------------------
namespace System.CodeDom {
using System.Diagnostics;
using System;
using Microsoft.Win32;
using System.Collections;
using System.Runtime.InteropServices;
///
///
/// Represents a delegate creation expression.
///
///
[
ClassInterface(ClassInterfaceType.AutoDispatch),
ComVisible(true),
Serializable,
]
public class CodeDelegateCreateExpression : CodeExpression {
private CodeTypeReference delegateType;
private CodeExpression targetObject;
private string methodName;
///
///
/// Initializes a new instance of .
///
///
public CodeDelegateCreateExpression() {
}
///
///
/// Initializes a new instance of .
///
///
public CodeDelegateCreateExpression(CodeTypeReference delegateType, CodeExpression targetObject, string methodName) {
this.delegateType = delegateType;
this.targetObject = targetObject;
this.methodName = methodName;
}
///
///
/// Gets or sets the delegate type.
///
///
public CodeTypeReference DelegateType {
get {
if (delegateType == null) {
delegateType = new CodeTypeReference("");
}
return delegateType;
}
set {
delegateType = value;
}
}
///
///
/// Gets or sets the target object.
///
///
public CodeExpression TargetObject {
get {
return targetObject;
}
set {
targetObject = value;
}
}
///
///
/// Gets or sets the method name.
///
///
public string MethodName {
get {
return (methodName == null) ? string.Empty : methodName;
}
set {
methodName = value;
}
}
}
}