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

            Type = type;
            Name = name;
        }
コード例 #5
0
 protected MemberDeclaration(string name)
 {
     CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
     Implements       = new CodeObjectCollection <MemberReferenceExpression>(this);
     CommentsBefore   = new CommentCollection(this);
     CommentsAfter    = new CommentCollection(this);
     Name             = name;
 }
コード例 #6
0
 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);
 }
コード例 #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);
 }
コード例 #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;
        }
コード例 #9
0
 public NewObjectExpression(TypeReference?type, params Expression[] arguments)
 {
     Arguments = new CodeObjectCollection <Expression>(this);
     Type      = type;
     foreach (var argument in arguments)
     {
         Arguments.Add(argument);
     }
 }
コード例 #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);
 }
コード例 #11
0
        public ArrayIndexerExpression(Expression?array, params Expression[] indices)
        {
            Indices = new CodeObjectCollection <Expression>(this);

            ArrayExpression = array;
            foreach (var index in indices)
            {
                Indices.Add(index);
            }
        }
コード例 #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);
                }
            }
        }
コード例 #13
0
        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);
                }
            }
        }
コード例 #14
0
        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);
                }
            }
        }
コード例 #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);
            }
        }
コード例 #16
0
 public EnumerationDeclaration()
 {
     Members = new CodeObjectCollection <EnumerationMember>(this);
 }
コード例 #17
0
 public OperatorDeclaration(string?name)
 {
     Statements = new StatementCollection(this);
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Name       = name;
 }
コード例 #18
0
 public CodeTypeDeclaration()
 {
     CustomAttributes = new CodeObjectCollection <CodeCustomAttribute>(this);
 }
コード例 #19
0
 public DelegateDeclaration(string?name)
 {
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Parameters = new CodeObjectCollection <TypeParameter>(this);
     Name       = name;
 }
コード例 #20
0
 public EnumerationDeclaration(string?name)
 {
     Members = new CodeObjectCollection <EnumerationMember>(this);
     Name    = name;
 }
コード例 #21
0
 public NewObjectExpression()
 {
     Arguments = new CodeObjectCollection <Expression>(this);
 }
コード例 #22
0
 public CodeMemberDeclaration()
 {
     CustomAttributes = new CodeObjectCollection <CodeCustomAttribute>(this);
     Implements       = new CodeObjectCollection <CodeMemberReferenceExpression>(this);
 }
コード例 #23
0
 public ConstructorDeclaration()
 {
     Arguments  = new CodeObjectCollection <MethodArgumentDeclaration>(this);
     Statements = new StatementCollection(this);
 }
コード例 #24
0
 public PropertyAccessorDeclaration(StatementCollection statements)
 {
     Statements       = statements ?? new StatementCollection();
     CustomAttributes = new CodeObjectCollection <CustomAttribute>(this);
 }
コード例 #25
0
 public MethodDeclaration(string?name)
 {
     Arguments  = new MethodArgumentCollection(this);
     Parameters = new CodeObjectCollection <TypeParameter>(this);
     Name       = name;
 }
コード例 #26
0
 public CodeCustomAttribute(CodeTypeReference typeReference)
 {
     Arguments = new CodeObjectCollection <CodeCustomAttributeArgument>(this);
     Type      = typeReference;
 }