internal AttributeGroupWithCodeAnalysis()
 {
     node       = new Node <AttributeGroupWithCodeAnalysis, AttributeListSyntax>(this);
     attributes = new SeparatedSyntaxNodeList <AttributeGroupWithCodeAnalysis, AttributeListSyntax, AttributeWithCodeAnalysis, AttributeSyntax>(
         node,
         syntax => syntax.Attributes,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributes(childSyntax),
         () => new AttributeWithCodeAnalysis());
 }
 internal NestedEnumWithCodeAnalysis()
 {
     node       = new Node <NestedEnumWithCodeAnalysis, EnumDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <NestedEnumWithCodeAnalysis, EnumDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     enumMembers = new SeparatedSyntaxNodeList <NestedEnumWithCodeAnalysis, EnumDeclarationSyntax, NestedEnumMemberWithCodeAnalysis, EnumMemberDeclarationSyntax>(
         node,
         syntax => syntax.Members,
         (parentSyntax, childSyntax) => parentSyntax.WithMembers(childSyntax),
         () => new NestedEnumMemberWithCodeAnalysis());
 }
示例#3
0
 internal EnumWithCodeAnalysis(DocumentWithCodeAnalysis document)
 {
     node          = new Node <EnumWithCodeAnalysis, EnumDeclarationSyntax>(this);
     this.document = document;
     attributes    = new AttributeListWrapper <EnumWithCodeAnalysis, EnumDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     enumMembers = new SeparatedSyntaxNodeList <EnumWithCodeAnalysis, EnumDeclarationSyntax, EnumMemberWithCodeAnalysis, EnumMemberDeclarationSyntax>(
         node,
         syntax => syntax.Members,
         (parentSyntax, childSyntax) => parentSyntax.WithMembers(childSyntax),
         () => new EnumMemberWithCodeAnalysis());
 }
 internal ConstantGroupWithCodeAnalysis()
 {
     node       = new Node <ConstantGroupWithCodeAnalysis, FieldDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <ConstantGroupWithCodeAnalysis, FieldDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     constants = new SeparatedSyntaxNodeList <ConstantGroupWithCodeAnalysis, FieldDeclarationSyntax, ConstantWithCodeAnalysis, VariableDeclaratorSyntax>(
         node,
         syntax => syntax.Declaration.Variables,
         (parentSyntax, childSyntax) => parentSyntax.WithDeclaration(parentSyntax.Declaration.WithVariables(childSyntax)),
         () => new ConstantWithCodeAnalysis());
     constantType = new CachedTypeReferenceNode <ConstantGroupWithCodeAnalysis, FieldDeclarationSyntax>(
         node,
         syntax => syntax.Declaration.Type,
         (parentSyntax, childSyntax) => parentSyntax.WithDeclaration(parentSyntax.Declaration.WithType(childSyntax)));
 }
示例#5
0
 internal ConstructorWithCodeAnalysis()
 {
     node       = new Node <ConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <ConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     body = new MethodBodyNode <ConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(
         node,
         syntax => syntax.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
     parameters = new SeparatedSyntaxNodeList <ConstructorWithCodeAnalysis, ConstructorDeclarationSyntax, ConstructorParameterWithCodeAnalysis, ParameterSyntax>(
         node,
         syntax => syntax.ParameterList.Parameters,
         (parentSyntax, childSyntax) => parentSyntax.WithParameterList(parentSyntax.ParameterList.WithParameters(childSyntax)),
         () => new ConstructorParameterWithCodeAnalysis());
 }
示例#6
0
 internal IndexerWithCodeAnalysis()
 {
     node       = new Node <IndexerWithCodeAnalysis, IndexerDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <IndexerWithCodeAnalysis, IndexerDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     getAccessor = GetAccessorNode(SyntaxKind.GetKeyword);
     indexerType = new CachedTypeReferenceNode <IndexerWithCodeAnalysis, IndexerDeclarationSyntax>(
         node,
         syntax => syntax.Type,
         (parentSyntax, childSyntax) => parentSyntax.WithType(childSyntax));
     parameters = new SeparatedSyntaxNodeList <IndexerWithCodeAnalysis, IndexerDeclarationSyntax, IndexerParameterWithCodeAnalysis, ParameterSyntax>(
         node,
         syntax => syntax.ParameterList.Parameters,
         (parentSyntax, childSyntax) => parentSyntax.WithParameterList(parentSyntax.ParameterList.WithParameters(childSyntax)),
         () => new IndexerParameterWithCodeAnalysis());
     setAccessor = GetAccessorNode(SyntaxKind.SetKeyword);
 }
 internal OperatorOverloadWithCodeAnalysis()
 {
     node       = new Node <OperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <OperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     body = new MethodBodyNode <OperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax>(
         node,
         syntax => syntax.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
     parameters = new SeparatedSyntaxNodeList <OperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax, OperatorParameterWithCodeAnalysis, ParameterSyntax>(
         node,
         syntax => syntax.ParameterList.Parameters,
         (parentSyntax, childSyntax) => parentSyntax.WithParameterList(parentSyntax.ParameterList.WithParameters(childSyntax)),
         () => new OperatorParameterWithCodeAnalysis());
     returnType = new CachedTypeReferenceNode <OperatorOverloadWithCodeAnalysis, OperatorDeclarationSyntax>(
         node,
         syntax => syntax.ReturnType,
         (parentSyntax, childSyntax) => parentSyntax.WithReturnType(childSyntax));
 }
示例#8
0
 internal MethodWithCodeAnalysis()
 {
     node = new Node<MethodWithCodeAnalysis, MethodDeclarationSyntax>(this);
     attributes = new AttributeListWrapper<MethodWithCodeAnalysis, MethodDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     genericParameters = new GenericParameterDeclarationNodeList<MethodWithCodeAnalysis, MethodDeclarationSyntax>(
         node,
         syntax => syntax.TypeParameterList,
         (parentSyntax, childSyntax) => parentSyntax.WithTypeParameterList(childSyntax),
         syntax => syntax.ConstraintClauses,
         (parentSyntax, childSyntax) => parentSyntax.WithConstraintClauses(childSyntax));
     parameters = new SeparatedSyntaxNodeList<MethodWithCodeAnalysis, MethodDeclarationSyntax, MethodParameterWithCodeAnalysis, ParameterSyntax>(
         node,
         syntax => syntax.ParameterList.Parameters,
         (parentSyntax, childSyntax) => parentSyntax.WithParameterList(parentSyntax.ParameterList.WithParameters(childSyntax)),
         () => new MethodParameterWithCodeAnalysis());
     returnType = new CachedTypeReferenceNode<MethodWithCodeAnalysis, MethodDeclarationSyntax>(
         node,
         syntax => syntax.ReturnType,
         (parentSyntax, childSyntax) => parentSyntax.WithReturnType(childSyntax));
 }
示例#9
0
 private ExpressionListWrapper(
     SeparatedSyntaxNodeList <TParent, TParentSyntax, IInternalExpression, ExpressionSyntax> list)
     : base(list, parent => parent, child => child as IInternalExpression)
 {
     this.list = list;
 }