CodeObjectCreateExpression.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / CompMod / System / CodeDOM / CodeObjectCreateExpression.cs / 1 / CodeObjectCreateExpression.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 an object create expression. 
    ///    
    ///  
    [
        ClassInterface(ClassInterfaceType.AutoDispatch),
        ComVisible(true),
        Serializable, 
    ]
    public class CodeObjectCreateExpression : CodeExpression { 
        private CodeTypeReference createType; 
        private CodeExpressionCollection parameters = new CodeExpressionCollection();
 
        /// 
        ///    
        ///       Initializes a new .
        ///     
        /// 
        public CodeObjectCreateExpression() { 
        } 

        ///  
        ///    
        ///       Initializes a new  using the specified type and
        ///       parameters.
        ///     
        /// 
        public CodeObjectCreateExpression(CodeTypeReference createType, params CodeExpression[] parameters) { 
            CreateType = createType; 
            Parameters.AddRange(parameters);
        } 

        /// 
        ///    [To be supplied.]
        ///  
        public CodeObjectCreateExpression(string createType, params CodeExpression[] parameters) {
            CreateType = new CodeTypeReference(createType); 
            Parameters.AddRange(parameters); 
        }
 
        /// 
        ///    [To be supplied.]
        /// 
        public CodeObjectCreateExpression(Type createType, params CodeExpression[] parameters) { 
            CreateType = new CodeTypeReference(createType);
            Parameters.AddRange(parameters); 
        } 

        ///  
        ///    
        ///       The type of the object to create.
        ///    
        ///  
        public CodeTypeReference CreateType {
            get { 
                if (createType == null) { 
                    createType = new CodeTypeReference("");
                } 
                return createType;
            }
            set {
                createType = value; 
            }
        } 
 
        /// 
        ///     
        ///       Gets or sets the parameters to use in creating the
        ///       object.
        ///    
        ///  
        public CodeExpressionCollection Parameters {
            get { 
                return parameters; 
            }
        } 
    }
}

// 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 an object create expression. 
    ///    
    ///  
    [
        ClassInterface(ClassInterfaceType.AutoDispatch),
        ComVisible(true),
        Serializable, 
    ]
    public class CodeObjectCreateExpression : CodeExpression { 
        private CodeTypeReference createType; 
        private CodeExpressionCollection parameters = new CodeExpressionCollection();
 
        /// 
        ///    
        ///       Initializes a new .
        ///     
        /// 
        public CodeObjectCreateExpression() { 
        } 

        ///  
        ///    
        ///       Initializes a new  using the specified type and
        ///       parameters.
        ///     
        /// 
        public CodeObjectCreateExpression(CodeTypeReference createType, params CodeExpression[] parameters) { 
            CreateType = createType; 
            Parameters.AddRange(parameters);
        } 

        /// 
        ///    [To be supplied.]
        ///  
        public CodeObjectCreateExpression(string createType, params CodeExpression[] parameters) {
            CreateType = new CodeTypeReference(createType); 
            Parameters.AddRange(parameters); 
        }
 
        /// 
        ///    [To be supplied.]
        /// 
        public CodeObjectCreateExpression(Type createType, params CodeExpression[] parameters) { 
            CreateType = new CodeTypeReference(createType);
            Parameters.AddRange(parameters); 
        } 

        ///  
        ///    
        ///       The type of the object to create.
        ///    
        ///  
        public CodeTypeReference CreateType {
            get { 
                if (createType == null) { 
                    createType = new CodeTypeReference("");
                } 
                return createType;
            }
            set {
                createType = value; 
            }
        } 
 
        /// 
        ///     
        ///       Gets or sets the parameters to use in creating the
        ///       object.
        ///    
        ///  
        public CodeExpressionCollection Parameters {
            get { 
                return parameters; 
            }
        } 
    }
}

// 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