示例#1
0
        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;
        }
 public virtual void VisitTypeParameterList(TypeParameterListSyntax node)
 {
     DefaultVisit(node);
 }
示例#3
0
        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
        public static TypeParameterListSyntax TypeParameterList(params TypeParameterSyntax[] parameters)
        {
            var result = new TypeParameterListSyntax();

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

            return result;
        }
示例#5
0
        public static TypeParameterListSyntax TypeParameterList(IEnumerable<TypeParameterSyntax> parameters = null)
        {
            var result = new TypeParameterListSyntax();

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

            return result;
        }
示例#6
0
        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);
 }