internal FieldWithCodeAnalysis() { node = new Node <FieldWithCodeAnalysis, VariableDeclaratorSyntax>(this); initialValue = new CachedExpressionNode <FieldWithCodeAnalysis, VariableDeclaratorSyntax>( node, syntax => syntax.Initializer.Value, VariableDeclaratorSyntaxExtensions.WithInitialValue); }
internal LambdaPropertyWithCodeAnalysis() { property = new PropertyWithCodeAnalysis(); lambdaExpression = new CachedExpressionNode <PropertyWithCodeAnalysis, PropertyDeclarationSyntax>( property.Node, syntax => syntax.ExpressionBody?.Expression, (parentSyntax, childSyntax) => parentSyntax.WithExpressionBody(childSyntax == null ? null : SyntaxFactory.ArrowExpressionClause(childSyntax))); }
internal NamedAttributeValueWithCodeAnalysis() { node = new Node <NamedAttributeValueWithCodeAnalysis, AttributeArgumentSyntax>(this); value = new CachedExpressionNode <NamedAttributeValueWithCodeAnalysis, AttributeArgumentSyntax>( node, syntax => syntax.Expression, (parentSyntax, childSyntax) => parentSyntax.WithExpression(childSyntax)); }
internal AutoPropertyWithCodeAnalysis() { property = new PropertyWithCodeAnalysis(); initialValue = new CachedExpressionNode <PropertyWithCodeAnalysis, PropertyDeclarationSyntax>( property.Node, syntax => syntax.Initializer?.Value, (parentSyntax, childSyntax) => parentSyntax.WithInitializer(childSyntax == null ? null : SyntaxFactory.EqualsValueClause(childSyntax))); }