コード例 #1
0
ファイル: Syntax.cs プロジェクト: modulexcite/CSharpSyntax
        public static DelegateDeclarationSyntax DelegateDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), string returnType = null, string identifier = null, TypeParameterListSyntax typeParameterList = null, ParameterListSyntax parameterList = null, IEnumerable<TypeParameterConstraintClauseSyntax> constraintClauses = null)
        {
            var result = new DelegateDeclarationSyntax();

            if (attributeLists != null)
                result.AttributeLists.AddRange(attributeLists);
            result.Modifiers = modifiers;
            if (returnType != null)
                result.ReturnType = ParseName(returnType);
            result.Identifier = identifier;
            result.TypeParameterList = typeParameterList;
            result.ParameterList = parameterList;
            if (constraintClauses != null)
                result.ConstraintClauses.AddRange(constraintClauses);

            return result;
        }
コード例 #2
0
 public virtual void VisitTypeParameterList(TypeParameterListSyntax node)
 {
     DefaultVisit(node);
 }
コード例 #3
0
ファイル: Syntax.cs プロジェクト: modulexcite/CSharpSyntax
        public static ClassDeclarationSyntax ClassDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), string identifier = null, TypeParameterListSyntax typeParameterList = null, BaseListSyntax baseList = null, IEnumerable<TypeParameterConstraintClauseSyntax> constraintClauses = null, IEnumerable<MemberDeclarationSyntax> members = null)
        {
            var result = new ClassDeclarationSyntax();

            if (attributeLists != null)
                result.AttributeLists.AddRange(attributeLists);
            result.Modifiers = modifiers;
            result.Identifier = identifier;
            result.TypeParameterList = typeParameterList;
            result.BaseList = baseList;
            if (constraintClauses != null)
                result.ConstraintClauses.AddRange(constraintClauses);
            if (members != null)
                result.Members.AddRange(members);

            return result;
        }
コード例 #4
0
ファイル: Syntax.cs プロジェクト: modulexcite/CSharpSyntax
        public static TypeParameterListSyntax TypeParameterList(params TypeParameterSyntax[] parameters)
        {
            var result = new TypeParameterListSyntax();

            if (parameters != null)
                result.Parameters.AddRange(parameters);

            return result;
        }
コード例 #5
0
ファイル: Syntax.cs プロジェクト: modulexcite/CSharpSyntax
        public static TypeParameterListSyntax TypeParameterList(IEnumerable<TypeParameterSyntax> parameters = null)
        {
            var result = new TypeParameterListSyntax();

            if (parameters != null)
                result.Parameters.AddRange(parameters);

            return result;
        }
コード例 #6
0
ファイル: Syntax.cs プロジェクト: modulexcite/CSharpSyntax
        public static MethodDeclarationSyntax MethodDeclaration(IEnumerable<AttributeListSyntax> attributeLists = null, Modifiers modifiers = default(Modifiers), string returnType = null, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier = null, string identifier = null, TypeParameterListSyntax typeParameterList = null, ParameterListSyntax parameterList = null, IEnumerable<TypeParameterConstraintClauseSyntax> constraintClauses = null, BlockSyntax body = null)
        {
            var result = new MethodDeclarationSyntax();

            if (attributeLists != null)
                result.AttributeLists.AddRange(attributeLists);
            result.Modifiers = modifiers;
            if (returnType != null)
                result.ReturnType = ParseName(returnType);
            result.ExplicitInterfaceSpecifier = explicitInterfaceSpecifier;
            result.Identifier = identifier;
            result.TypeParameterList = typeParameterList;
            result.ParameterList = parameterList;
            if (constraintClauses != null)
                result.ConstraintClauses.AddRange(constraintClauses);
            result.Body = body;

            return result;
        }
コード例 #7
0
 public virtual void VisitTypeParameterList(TypeParameterListSyntax node)
 {
     DefaultVisit(node);
 }