public CustomAttribute(TypeReference?typeReference)
 {
     Arguments      = new CodeObjectCollection <CustomAttributeArgument>(this);
     CommentsBefore = new CommentCollection(this);
     CommentsAfter  = new CommentCollection(this);
     Type           = typeReference;
 }
 protected TypeDeclaration()
 {
     CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
     CommentsBefore   = new CommentCollection(this);
     CommentsAfter    = new CommentCollection(this);
     XmlComments      = new XmlCommentCollection(this);
 }
Beispiel #3
0
 public CodeNamespaceDeclaration(string name)
 {
     Name       = name;
     Types      = new CodeObjectCollection <CodeTypeDeclaration>(this);
     Usings     = new CodeObjectCollection <CodeUsingDirective>(this);
     Namespaces = new CodeObjectCollection <CodeNamespaceDeclaration>(this);
 }
        public CodeMethodArgumentDeclaration(CodeTypeReference type, string name)
        {
            CustomAttributes = new CodeObjectCollection <CodeCustomAttribute>(this);

            Type = type;
            Name = name;
        }
 protected MemberDeclaration(string name)
 {
     CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
     Implements       = new CodeObjectCollection <MemberReferenceExpression>(this);
     CommentsBefore   = new CommentCollection(this);
     CommentsAfter    = new CommentCollection(this);
     Name             = name;
 }
 public CodeClassDeclaration(string name)
 {
     Name       = name;
     Implements = new CodeObjectCollection <CodeTypeReference>(this);
     Parameters = new CodeObjectCollection <CodeTypeReference>(this);
     Members    = new CodeObjectCollection <CodeMemberDeclaration>(this);
     Types      = new CodeObjectCollection <CodeTypeDeclaration>(this);
 }
Beispiel #7
0
 public InterfaceDeclaration(string?name)
 {
     Name       = name;
     Implements = new CodeObjectCollection <TypeReference>(this);
     Parameters = new CodeObjectCollection <TypeParameter>(this);
     Members    = new CodeObjectCollection <MemberDeclaration>(this);
     Types      = new CodeObjectCollection <TypeDeclaration>(this);
 }
Beispiel #8
0
        public MethodArgumentDeclaration(TypeReference type, string name)
        {
            CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
            CommentsBefore   = new CommentCollection(this);
            CommentsAfter    = new CommentCollection(this);

            Type = type;
            Name = name;
        }
 public NewObjectExpression(TypeReference?type, params Expression[] arguments)
 {
     Arguments = new CodeObjectCollection <Expression>(this);
     Type      = type;
     foreach (var argument in arguments)
     {
         Arguments.Add(argument);
     }
 }
Beispiel #10
0
 public NamespaceDeclaration(string name)
 {
     Name           = name;
     Types          = new CodeObjectCollection <TypeDeclaration>(this);
     Usings         = new CodeObjectCollection <UsingDirective>(this);
     Namespaces     = new CodeObjectCollection <NamespaceDeclaration>(this);
     CommentsBefore = new CommentCollection(this);
     CommentsAfter  = new CommentCollection(this);
 }
        public ArrayIndexerExpression(Expression?array, params Expression[] indices)
        {
            Indices = new CodeObjectCollection <Expression>(this);

            ArrayExpression = array;
            foreach (var index in indices)
            {
                Indices.Add(index);
            }
        }
Beispiel #12
0
        public CodeArrayIndexerExpression(CodeExpression array, params CodeExpression[] indices)
        {
            Indices = new CodeObjectCollection <CodeExpression>(this);

            ArrayExpression = array;
            if (indices != null)
            {
                foreach (var index in indices)
                {
                    Indices.Add(index);
                }
            }
        }
        public CodeNewObjectExpression(CodeTypeReference type, params CodeExpression[] arguments)
        {
            Arguments = new CodeObjectCollection <CodeExpression>(this);

            Type = type;

            if (arguments != null)
            {
                foreach (var argument in arguments)
                {
                    Arguments.Add(argument);
                }
            }
        }
        public CodeMethodInvokeExpression(CodeExpression method, params CodeExpression[] arguments)
        {
            Arguments = new CodeObjectCollection <CodeExpression>(this);

            Method = method;

            if (arguments != null)
            {
                foreach (var argument in arguments)
                {
                    Arguments.Add(argument);
                }
            }
        }
Beispiel #15
0
        public MethodInvokeExpression(Expression method, TypeReference[] parameters, params Expression[] arguments)
        {
            Parameters = new CodeObjectCollection <TypeReference>();
            Arguments  = new CodeObjectCollection <Expression>(this);
            Method     = method;

            if (arguments != null)
            {
                Arguments.AddRange(arguments);
            }

            if (parameters != null)
            {
                Parameters.AddRange(parameters);
            }
        }
 public EnumerationDeclaration()
 {
     Members = new CodeObjectCollection <EnumerationMember>(this);
 }
Beispiel #17
0
 public OperatorDeclaration(string?name)
 {
     Statements = new StatementCollection(this);
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Name       = name;
 }
 public CodeTypeDeclaration()
 {
     CustomAttributes = new CodeObjectCollection <CodeCustomAttribute>(this);
 }
Beispiel #19
0
 public DelegateDeclaration(string?name)
 {
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Parameters = new CodeObjectCollection <TypeParameter>(this);
     Name       = name;
 }
 public EnumerationDeclaration(string?name)
 {
     Members = new CodeObjectCollection <EnumerationMember>(this);
     Name    = name;
 }
 public NewObjectExpression()
 {
     Arguments = new CodeObjectCollection <Expression>(this);
 }
 public CodeMemberDeclaration()
 {
     CustomAttributes = new CodeObjectCollection <CodeCustomAttribute>(this);
     Implements       = new CodeObjectCollection <CodeMemberReferenceExpression>(this);
 }
 public ConstructorDeclaration()
 {
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Statements = new StatementCollection(this);
 }
Beispiel #24
0
 public PropertyAccessorDeclaration(StatementCollection statements)
 {
     Statements       = statements ?? new StatementCollection();
     CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
 }
 public MethodDeclaration(string?name)
 {
     Arguments  = new MethodArgumentCollection(this);
     Parameters = new CodeObjectCollection <TypeParameter>(this);
     Name       = name;
 }
 public CodeCustomAttribute(CodeTypeReference typeReference)
 {
     Arguments = new CodeObjectCollection <CodeCustomAttributeArgument>(this);
     Type      = typeReference;
 }