Exemplo n.º 1
0
 internal AccessorWithBodyWithCodeAnalysis(AccessorWithCodeAnalysis accessor)
 {
     this.accessor = accessor;
     body          = new MethodBodyNode <AccessorWithCodeAnalysis, AccessorDeclarationSyntax>(
         accessor.Node,
         syntax => syntax?.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
 }
Exemplo n.º 2
0
 internal MethodWithBodyWithCodeAnalysis()
 {
     this.method = new MethodWithCodeAnalysis();
     body        = new MethodBodyNode <MethodWithCodeAnalysis, MethodDeclarationSyntax>(
         this.method.Node,
         syntax => syntax.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
 }
 internal StaticConstructorWithCodeAnalysis()
 {
     node       = new Node <StaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <StaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     body = new MethodBodyNode <StaticConstructorWithCodeAnalysis, ConstructorDeclarationSyntax>(
         node,
         syntax => syntax.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
 }
Exemplo n.º 4
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());
 }
 internal ConversionOperatorWithCodeAnalysis()
 {
     node       = new Node <ConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax>(this);
     attributes = new AttributeListWrapper <ConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax>(
         node,
         syntax => syntax.AttributeLists,
         (parentSyntax, childSyntax) => parentSyntax.WithAttributeLists(childSyntax));
     body = new MethodBodyNode <ConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax>(
         node,
         syntax => syntax.Body,
         (parentSyntax, childSyntax) => parentSyntax.WithBody(childSyntax));
     parameter = new CachedChildNode <ConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax, OperatorParameterWithCodeAnalysis, ParameterSyntax>(
         node,
         () => new OperatorParameterWithCodeAnalysis(),
         syntax => syntax.ParameterList.Parameters[0],
         WithParameter);
     returnType = new CachedTypeReferenceNode <ConversionOperatorWithCodeAnalysis, ConversionOperatorDeclarationSyntax>(
         node,
         syntax => syntax.Type,
         (parentSyntax, childSyntax) => parentSyntax.WithType(childSyntax));
 }
 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));
 }