Skip to main content

CSharpFactory Class

Namespace: Roslynator.CSharp

Assembly: Roslynator.CSharp.dll

A factory for syntax nodes, tokens and trivia. This class is built on top of SyntaxFactory members.

public static class CSharpFactory

Methods

MethodSummary
AccessorList(AccessorDeclarationSyntax)
AccessorList(AccessorDeclarationSyntax[])
AddAccessorDeclaration(ArrowExpressionClauseSyntax)
AddAccessorDeclaration(BlockSyntax)
AddAccessorDeclaration(SyntaxTokenList, ArrowExpressionClauseSyntax)
AddAccessorDeclaration(SyntaxTokenList, BlockSyntax)
AddAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
AddAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
AddExpression(ExpressionSyntax, ExpressionSyntax)
AddExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
AddressOfExpression(ExpressionSyntax, SyntaxToken)
AddressOfExpression(ExpressionSyntax)
AndAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
AndAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Argument(NameColonSyntax, ExpressionSyntax)
ArgumentList(ArgumentSyntax)
ArgumentList(ArgumentSyntax[])
ArrayInitializerExpression(SeparatedSyntaxList<ExpressionSyntax>)
ArrayInitializerExpression(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
AsExpression(ExpressionSyntax, ExpressionSyntax)
AsExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Attribute(NameSyntax, AttributeArgumentSyntax)
AttributeArgument(NameColonSyntax, ExpressionSyntax)
AttributeArgument(NameEqualsSyntax, ExpressionSyntax)
AttributeArgumentList(AttributeArgumentSyntax)
AttributeArgumentList(AttributeArgumentSyntax[])
AttributeList(AttributeSyntax)
AttributeList(AttributeSyntax[])
AutoGetAccessorDeclaration(SyntaxTokenList)
AutoInitAccessorDeclaration(SyntaxTokenList)
AutoSetAccessorDeclaration(SyntaxTokenList)
BaseConstructorInitializer(ArgumentListSyntax)
BaseConstructorInitializer(SyntaxToken, ArgumentListSyntax)
BaseList(BaseTypeSyntax)
BaseList(BaseTypeSyntax[])
BaseList(SyntaxToken, BaseTypeSyntax)
BaseList(SyntaxToken, BaseTypeSyntax[])
BitwiseAndExpression(ExpressionSyntax, ExpressionSyntax)
BitwiseAndExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
BitwiseNotExpression(ExpressionSyntax, SyntaxToken)
BitwiseNotExpression(ExpressionSyntax)
BitwiseOrExpression(ExpressionSyntax, ExpressionSyntax)
BitwiseOrExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Block(StatementSyntax)
Block(SyntaxToken, StatementSyntax, SyntaxToken)
BooleanLiteralExpression(Boolean)
BracketedArgumentList(ArgumentSyntax)
BracketedArgumentList(ArgumentSyntax[])
BracketedParameterList(ParameterSyntax)
BracketedParameterList(ParameterSyntax[])
CharacterLiteralExpression(Char)
CheckedExpression(ExpressionSyntax)
CheckedExpression(SyntaxToken, ExpressionSyntax, SyntaxToken)
ClassConstraint()
ClassDeclaration(SyntaxTokenList, String, SyntaxList<MemberDeclarationSyntax>)
ClassDeclaration(SyntaxTokenList, SyntaxToken, SyntaxList<MemberDeclarationSyntax>)
CoalesceAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
CoalesceAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
CoalesceExpression(ExpressionSyntax, ExpressionSyntax)
CoalesceExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
CollectionInitializerExpression(SeparatedSyntaxList<ExpressionSyntax>)
CollectionInitializerExpression(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
CompilationUnit(MemberDeclarationSyntax)
CompilationUnit(SyntaxList<UsingDirectiveSyntax>, MemberDeclarationSyntax)
CompilationUnit(SyntaxList<UsingDirectiveSyntax>, SyntaxList<MemberDeclarationSyntax>)
ComplexElementInitializerExpression(SeparatedSyntaxList<ExpressionSyntax>)
ComplexElementInitializerExpression(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
ConstructorDeclaration(SyntaxTokenList, SyntaxToken, ParameterListSyntax, ArrowExpressionClauseSyntax)
ConstructorDeclaration(SyntaxTokenList, SyntaxToken, ParameterListSyntax, BlockSyntax)
DefaultLiteralExpression()
DefaultSwitchSection(StatementSyntax)
DefaultSwitchSection(SyntaxList<StatementSyntax>)
DelegateDeclaration(SyntaxTokenList, TypeSyntax, String, ParameterListSyntax)
DelegateDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax)
DivideAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
DivideAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
DivideExpression(ExpressionSyntax, ExpressionSyntax)
DivideExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
EmptyWhitespace()
EnumDeclaration(SyntaxTokenList, SyntaxToken, SeparatedSyntaxList<EnumMemberDeclarationSyntax>)
EnumMemberDeclaration(String, EqualsValueClauseSyntax)
EnumMemberDeclaration(String, ExpressionSyntax)
EnumMemberDeclaration(SyntaxToken, EqualsValueClauseSyntax)
EnumMemberDeclaration(SyntaxToken, ExpressionSyntax)
EqualsExpression(ExpressionSyntax, ExpressionSyntax)
EqualsExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
EventDeclaration(SyntaxTokenList, TypeSyntax, String, AccessorListSyntax)
EventDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, AccessorListSyntax)
EventFieldDeclaration(SyntaxTokenList, TypeSyntax, String)
EventFieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken)
ExclusiveOrAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
ExclusiveOrAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
ExclusiveOrExpression(ExpressionSyntax, ExpressionSyntax)
ExclusiveOrExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
ExplicitConversionOperatorDeclaration(SyntaxTokenList, TypeSyntax, ParameterListSyntax, ArrowExpressionClauseSyntax)
ExplicitConversionOperatorDeclaration(SyntaxTokenList, TypeSyntax, ParameterListSyntax, BlockSyntax)
FalseLiteralExpression()
FieldDeclaration(SyntaxTokenList, TypeSyntax, String, EqualsValueClauseSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, String, ExpressionSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ExpressionSyntax)
ForStatement(VariableDeclarationSyntax, ExpressionSyntax, ExpressionSyntax, StatementSyntax)
GenericName(String, TypeSyntax)
GenericName(SyntaxToken, TypeSyntax)
GetAccessorDeclaration(ArrowExpressionClauseSyntax)
GetAccessorDeclaration(BlockSyntax)
GetAccessorDeclaration(SyntaxTokenList, ArrowExpressionClauseSyntax)
GetAccessorDeclaration(SyntaxTokenList, BlockSyntax)
GreaterThanExpression(ExpressionSyntax, ExpressionSyntax)
GreaterThanExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
GreaterThanOrEqualExpression(ExpressionSyntax, ExpressionSyntax)
GreaterThanOrEqualExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
ImplicitConversionOperatorDeclaration(SyntaxTokenList, TypeSyntax, ParameterListSyntax, ArrowExpressionClauseSyntax)
ImplicitConversionOperatorDeclaration(SyntaxTokenList, TypeSyntax, ParameterListSyntax, BlockSyntax)
IndexerDeclaration(SyntaxTokenList, TypeSyntax, BracketedParameterListSyntax, AccessorListSyntax)
IndexerDeclaration(SyntaxTokenList, TypeSyntax, BracketedParameterListSyntax, ArrowExpressionClauseSyntax)
InterfaceDeclaration(SyntaxTokenList, String, SyntaxList<MemberDeclarationSyntax>)
InterfaceDeclaration(SyntaxTokenList, SyntaxToken, SyntaxList<MemberDeclarationSyntax>)
IsExpression(ExpressionSyntax, ExpressionSyntax)
IsExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LeftShiftAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
LeftShiftAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LeftShiftExpression(ExpressionSyntax, ExpressionSyntax)
LeftShiftExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LessThanExpression(ExpressionSyntax, ExpressionSyntax)
LessThanExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LessThanOrEqualExpression(ExpressionSyntax, ExpressionSyntax)
LessThanOrEqualExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LiteralExpression(Object)
LocalDeclarationStatement(TypeSyntax, String, EqualsValueClauseSyntax)
LocalDeclarationStatement(TypeSyntax, String, ExpressionSyntax)
LocalDeclarationStatement(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
LocalDeclarationStatement(TypeSyntax, SyntaxToken, ExpressionSyntax)
LocalFunctionStatement(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, ArrowExpressionClauseSyntax)
LocalFunctionStatement(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, BlockSyntax)
LogicalAndExpression(ExpressionSyntax, ExpressionSyntax)
LogicalAndExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
LogicalNotExpression(ExpressionSyntax, SyntaxToken)
LogicalNotExpression(ExpressionSyntax)
LogicalOrExpression(ExpressionSyntax, ExpressionSyntax)
LogicalOrExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
MethodDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, ArrowExpressionClauseSyntax)
MethodDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, BlockSyntax)
ModuloAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
ModuloAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
ModuloExpression(ExpressionSyntax, ExpressionSyntax)
ModuloExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
MultiplyAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
MultiplyAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
MultiplyExpression(ExpressionSyntax, ExpressionSyntax)
MultiplyExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
NameOfExpression(ExpressionSyntax)
NameOfExpression(String)
NamespaceDeclaration(NameSyntax, MemberDeclarationSyntax)
NamespaceDeclaration(NameSyntax, SyntaxList<MemberDeclarationSyntax>)
NewLine()
NotEqualsExpression(ExpressionSyntax, ExpressionSyntax)
NotEqualsExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
NotPattern(PatternSyntax)
NullLiteralExpression()
NumericLiteralExpression(Decimal)
NumericLiteralExpression(Double)
NumericLiteralExpression(Int32)
NumericLiteralExpression(Int64)
NumericLiteralExpression(SByte)
NumericLiteralExpression(Single)
NumericLiteralExpression(UInt32)
NumericLiteralExpression(UInt64)
ObjectCreationExpression(TypeSyntax, ArgumentListSyntax)
ObjectInitializerExpression(SeparatedSyntaxList<ExpressionSyntax>)
ObjectInitializerExpression(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
OperatorDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, ArrowExpressionClauseSyntax)
OperatorDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ParameterListSyntax, BlockSyntax)
OrAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
OrAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Parameter(TypeSyntax, String, ExpressionSyntax)
Parameter(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
Parameter(TypeSyntax, SyntaxToken, ExpressionSyntax)
ParameterList(ParameterSyntax)
ParameterList(ParameterSyntax[])
PointerIndirectionExpression(ExpressionSyntax, SyntaxToken)
PointerIndirectionExpression(ExpressionSyntax)
PostDecrementExpression(ExpressionSyntax, SyntaxToken)
PostDecrementExpression(ExpressionSyntax)
PostIncrementExpression(ExpressionSyntax, SyntaxToken)
PostIncrementExpression(ExpressionSyntax)
PreDecrementExpression(ExpressionSyntax, SyntaxToken)
PreDecrementExpression(ExpressionSyntax)
PredefinedBoolType()
PredefinedByteType()
PredefinedCharType()
PredefinedDecimalType()
PredefinedDoubleType()
PredefinedFloatType()
PredefinedIntType()
PredefinedLongType()
PredefinedObjectType()
PredefinedSByteType()
PredefinedShortType()
PredefinedStringType()
PredefinedUIntType()
PredefinedULongType()
PredefinedUShortType()
PreIncrementExpression(ExpressionSyntax, SyntaxToken)
PreIncrementExpression(ExpressionSyntax)
PropertyDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, AccessorListSyntax, ExpressionSyntax)
PropertyDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ArrowExpressionClauseSyntax)
RemoveAccessorDeclaration(ArrowExpressionClauseSyntax)
RemoveAccessorDeclaration(BlockSyntax)
RemoveAccessorDeclaration(SyntaxTokenList, ArrowExpressionClauseSyntax)
RemoveAccessorDeclaration(SyntaxTokenList, BlockSyntax)
RightShiftAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
RightShiftAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
RightShiftExpression(ExpressionSyntax, ExpressionSyntax)
RightShiftExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
SetAccessorDeclaration(ArrowExpressionClauseSyntax)
SetAccessorDeclaration(BlockSyntax)
SetAccessorDeclaration(SyntaxTokenList, ArrowExpressionClauseSyntax)
SetAccessorDeclaration(SyntaxTokenList, BlockSyntax)
SimpleAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
SimpleAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
SimpleAssignmentStatement(ExpressionSyntax, ExpressionSyntax)
SimpleAssignmentStatement(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
SimpleMemberAccessExpression(ExpressionSyntax, SimpleNameSyntax)
SimpleMemberAccessExpression(ExpressionSyntax, SyntaxToken, SimpleNameSyntax)
SimpleMemberInvocationExpression(ExpressionSyntax, SimpleNameSyntax, ArgumentListSyntax)
SimpleMemberInvocationExpression(ExpressionSyntax, SimpleNameSyntax, ArgumentSyntax)
SimpleMemberInvocationExpression(ExpressionSyntax, SimpleNameSyntax)
StringLiteralExpression(String)
StructConstraint()
StructDeclaration(SyntaxTokenList, String, SyntaxList<MemberDeclarationSyntax>)
StructDeclaration(SyntaxTokenList, SyntaxToken, SyntaxList<MemberDeclarationSyntax>)
SubtractAssignmentExpression(ExpressionSyntax, ExpressionSyntax)
SubtractAssignmentExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
SubtractExpression(ExpressionSyntax, ExpressionSyntax)
SubtractExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax)
SuppressNullableWarningExpression(ExpressionSyntax, SyntaxToken)
SuppressNullableWarningExpression(ExpressionSyntax)
SwitchSection(SwitchLabelSyntax, StatementSyntax)
SwitchSection(SwitchLabelSyntax, SyntaxList<StatementSyntax>)
SwitchSection(SyntaxList<SwitchLabelSyntax>, StatementSyntax)
ThisConstructorInitializer(ArgumentListSyntax)
ThisConstructorInitializer(SyntaxToken, ArgumentListSyntax)
TokenList(Accessibility)Creates a list of modifiers from the specified accessibility.
TokenList(SyntaxKind, SyntaxKind, SyntaxKind)
TokenList(SyntaxKind, SyntaxKind)
TokenList(SyntaxKind)
TrueLiteralExpression()
TryStatement(BlockSyntax, CatchClauseSyntax, FinallyClauseSyntax)
TypeArgumentList(TypeSyntax)
TypeArgumentList(TypeSyntax[])
TypeParameterConstraintClause(IdentifierNameSyntax, TypeParameterConstraintSyntax)
TypeParameterConstraintClause(String, TypeParameterConstraintSyntax)
TypeParameterList(TypeParameterSyntax)
TypeParameterList(TypeParameterSyntax[])
UnaryMinusExpression(ExpressionSyntax, SyntaxToken)
UnaryMinusExpression(ExpressionSyntax)
UnaryPlusExpression(ExpressionSyntax, SyntaxToken)
UnaryPlusExpression(ExpressionSyntax)
UncheckedExpression(ExpressionSyntax)
UncheckedExpression(SyntaxToken, ExpressionSyntax, SyntaxToken)
UsingStaticDirective(NameSyntax)
UsingStaticDirective(SyntaxToken, SyntaxToken, NameSyntax, SyntaxToken)
VariableDeclaration(TypeSyntax, String, ExpressionSyntax)
VariableDeclaration(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
VariableDeclaration(TypeSyntax, SyntaxToken, ExpressionSyntax)
VariableDeclaration(TypeSyntax, VariableDeclaratorSyntax)
VariableDeclarator(String, EqualsValueClauseSyntax)
VariableDeclarator(SyntaxToken, EqualsValueClauseSyntax)
VarType()
VoidType()
YieldBreakStatement()
YieldReturnStatement(ExpressionSyntax)