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