CodeDelegateCreateExpression.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / CodeDelegateCreateExpression.cs / 1305376 / CodeDelegateCreateExpression.cs

                            //------------------------------------------------------------------------------ 
// 
//
// [....]
//     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;
            }
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//
// [....]
//     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;
            }
        }
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK