SyntaxGenerator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A language agnostic factory for creating syntax nodes.
This API can be used to create language specific syntax nodes that are semantically similar between languages.
The trees generated by this API will try to respect user preferences when possible. For example, generating MemberAccessExpression(SyntaxNode, String) will be done in a way such that "this." or "Me." will be simplified according to user preference if Simplifier is used.
public ref class SyntaxGenerator abstract : Microsoft::CodeAnalysis::Host::ILanguageService
public abstract class SyntaxGenerator : Microsoft.CodeAnalysis.Host.ILanguageService
type SyntaxGenerator = class
interface ILanguageService
Public MustInherit Class SyntaxGenerator
Implements ILanguageService
- Inheritance
-
SyntaxGenerator
- Implements
Constructors
SyntaxGenerator() |
Fields
DefaultRemoveOptions |
Methods
AddAccessors(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the accessors added. |
AddAttributeArguments(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of the attribute with the arguments added. |
AddAttributes(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of a declaration with the specified attributes added. |
AddAttributes(SyntaxNode, SyntaxNode[]) |
Creates a new instance of a declaration with the specified attributes added. |
AddBaseType(SyntaxNode, SyntaxNode) |
Adds a base type to the declaration |
AddEventHandler(SyntaxNode, SyntaxNode) |
Creates a statement that adds the given handler to the given event. |
AddExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes an addition operation. |
AddInterfaceType(SyntaxNode, SyntaxNode) |
Adds an interface type to the declaration |
AddMembers(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the members added to the end. |
AddMembers(SyntaxNode, SyntaxNode[]) |
Creates a new instance of the declaration with the members added to the end. |
AddNamespaceImports(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the namespace imports added. |
AddNamespaceImports(SyntaxNode, SyntaxNode[]) |
Creates a new instance of the declaration with the namespace imports added. |
AddParameters(SyntaxNode, IEnumerable<SyntaxNode>) |
Adds the parameters to the declaration. |
AddReturnAttributes(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a new instance of a method declaration with return attributes added. |
AddReturnAttributes(SyntaxNode, SyntaxNode[]) |
Creates a new instance of a method declaration node with return attributes added. |
AddSwitchSections(SyntaxNode, IEnumerable<SyntaxNode>) |
Adds the switch sections to the statement. |
AliasImportDeclaration(String, INamespaceOrTypeSymbol) |
Creates an alias import declaration. |
AliasImportDeclaration(String, SyntaxNode) |
Creates an alias import declaration. |
Argument(RefKind, SyntaxNode) |
Creates a node that is an argument to an invocation. |
Argument(String, RefKind, SyntaxNode) |
Creates a node that is an argument to an invocation. |
Argument(SyntaxNode) |
Creates a node that is an argument to an invocation. |
ArrayCreationExpression(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates an array creation expression for a single dimensional array with specified initial element values. |
ArrayCreationExpression(SyntaxNode, SyntaxNode) |
Creates an array creation expression for a single dimensional array of specified size. |
ArrayTypeExpression(SyntaxNode) |
Creates an expression that denotes an array type. |
AsPrivateInterfaceImplementation(SyntaxNode, SyntaxNode, String) |
Converts method, property and indexer declarations into private interface implementations. This is equivalent to a C# explicit interface implementation (you can declare it for access via the interface, but cannot call it directly). |
AsPrivateInterfaceImplementation(SyntaxNode, SyntaxNode) |
Converts method, property and indexer declarations into private interface implementations. This is equivalent to a C# explicit interface implementation (you can declare it for access via the interface, but cannot call it directly). |
AsPublicInterfaceImplementation(SyntaxNode, SyntaxNode, String) |
Converts method, property and indexer declarations into public interface implementations. This is equivalent to an implicit C# interface implementation (you can access it via the interface or directly via the named member.) |
AsPublicInterfaceImplementation(SyntaxNode, SyntaxNode) |
Converts method, property and indexer declarations into public interface implementations. This is equivalent to an implicit C# interface implementation (you can access it via the interface or directly via the named member.) |
AssignmentStatement(SyntaxNode, SyntaxNode) |
Creates an expression that denotes an assignment from the right argument to left argument. |
Attribute(AttributeData) |
Creates an attribute matching existing attribute data. |
Attribute(String, IEnumerable<SyntaxNode>) |
Creates an attribute. |
Attribute(String, SyntaxNode[]) |
Creates an attribute. |
Attribute(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates an attribute. |
AttributeArgument(String, SyntaxNode) |
Creates an attribute argument. |
AttributeArgument(SyntaxNode) |
Creates an attribute argument. |
AwaitExpression(SyntaxNode) |
Creates an await expression. |
BaseExpression() |
Creates an expression that denotes the containing method's base-parameter. |
BitwiseAndExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a bitwise-and operation. |
BitwiseNotExpression(SyntaxNode) |
Creates an expression that denotes a bitwise-not operation |
BitwiseOrExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a bitwise-or operation. |
CastExpression(ITypeSymbol, SyntaxNode) |
Creates an expression that denotes a type cast operation. |
CastExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a type cast operation. |
CatchClause(ITypeSymbol, String, IEnumerable<SyntaxNode>) |
Creates a catch-clause. |
CatchClause(SyntaxNode, String, IEnumerable<SyntaxNode>) |
Creates a catch-clause. |
ClassDeclaration(String, IEnumerable<String>, Accessibility, DeclarationModifiers, SyntaxNode, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a class declaration. |
ClearTrivia<TNode>(TNode) |
Creates a new instance of the node with the leading and trailing trivia removed and replaced with elastic markers. |
CoalesceExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a coalesce operation. |
CompilationUnit(IEnumerable<SyntaxNode>) |
Creates a compilation unit declaration |
CompilationUnit(SyntaxNode[]) |
Creates a compilation unit declaration |
ConditionalAccessExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a conditional access operation. Use MemberBindingExpression(SyntaxNode) and ElementBindingExpression(IEnumerable<SyntaxNode>) to generate the |
ConditionalExpression(SyntaxNode, SyntaxNode, SyntaxNode) |
Creates an expression that denotes a conditional evaluation operation. |
ConstructorDeclaration(IMethodSymbol, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Create a constructor declaration using |
ConstructorDeclaration(String, IEnumerable<SyntaxNode>, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a constructor declaration. |
ConvertExpression(ITypeSymbol, SyntaxNode) |
Creates an expression that denotes a type conversion operation. |
ConvertExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a type conversion operation. |
CustomEventDeclaration(IEventSymbol, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a custom event declaration from an existing event symbol. |
CustomEventDeclaration(String, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a custom event declaration. |
Declaration(ISymbol) |
Creates a declaration matching an existing symbol. |
DefaultExpression(ITypeSymbol) | |
DefaultExpression(SyntaxNode) |
An expression that represents the default value of a type. This is typically a null value for reference types or a zero-filled value for value types. |
DefaultSwitchSection(IEnumerable<SyntaxNode>) |
Creates a default section for a switch statement. |
DelegateDeclaration(String, IEnumerable<SyntaxNode>, IEnumerable<String>, SyntaxNode, Accessibility, DeclarationModifiers) |
Creates a delegate declaration. |
DivideExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a division operation. |
DottedName(String) |
Creates a name expression from a dotted name string. |
ElementAccessExpression(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates an expression that access an element of an array or indexer. |
ElementAccessExpression(SyntaxNode, SyntaxNode[]) |
Creates an expression that access an element of an array or indexer. |
ElementBindingExpression(IEnumerable<SyntaxNode>) |
Creates an expression that denotes an element binding operation. |
ElementBindingExpression(SyntaxNode[]) |
Creates an expression that denotes an element binding operation. |
EnumDeclaration(String, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>) |
Creates an enum declaration. |
EnumMember(String, SyntaxNode) |
Creates an enum member |
EventDeclaration(IEventSymbol) |
Creates an event declaration from an existing event symbol |
EventDeclaration(String, SyntaxNode, Accessibility, DeclarationModifiers) |
Creates an event declaration. |
ExitSwitchStatement() |
Create a statement that exits a switch statement and continues after it. |
ExpressionStatement(SyntaxNode) |
Creates statement that allows an expression to execute in a statement context. This is typically an invocation or assignment expression. |
FalseLiteralExpression() |
Creates an expression that denotes the boolean false literal. |
FieldDeclaration(IFieldSymbol, SyntaxNode) |
Creates a field declaration matching an existing field symbol. |
FieldDeclaration(IFieldSymbol) |
Creates a field declaration matching an existing field symbol. |
FieldDeclaration(String, SyntaxNode, Accessibility, DeclarationModifiers, SyntaxNode) |
Creates a field declaration. |
GenericName(String, IEnumerable<ITypeSymbol>) |
Creates an expression that denotes a generic identifier name. |
GenericName(String, IEnumerable<SyntaxNode>) |
Creates an expression that denotes a generic identifier name. |
GenericName(String, ITypeSymbol[]) |
Creates an expression that denotes a generic identifier name. |
GenericName(String, SyntaxNode[]) |
Creates an expression that denotes a generic identifier name. |
GetAccessibility(SyntaxNode) |
Gets the accessibility of the declaration. |
GetAccessor(SyntaxNode, DeclarationKind) |
Gets the accessor of the specified kind for the declaration. |
GetAccessorDeclaration(Accessibility, IEnumerable<SyntaxNode>) | |
GetAccessors(SyntaxNode) |
Gets the accessors for the declaration. |
GetAttributeArguments(SyntaxNode) |
Gets the attribute arguments for the attribute declaration. |
GetAttributes(SyntaxNode) |
Gets the attributes of a declaration, not including the return attributes. |
GetBaseAndInterfaceTypes(SyntaxNode) |
Gets a list of the base and interface types for the declaration. |
GetDeclaration(SyntaxNode, DeclarationKind) |
Returns the enclosing declaration of the specified kind or null. |
GetDeclaration(SyntaxNode) |
Returns the node if it is a declaration, the immediate enclosing declaration if one exists, or null. |
GetDeclarationKind(SyntaxNode) |
Gets the DeclarationKind for the declaration. |
GetExpression(SyntaxNode) |
Gets the expression associated with the declaration. |
GetGenerator(Document) |
Gets the SyntaxGenerator for the language corresponding to the document. |
GetGenerator(Project) |
Gets the SyntaxGenerator for the language corresponding to the project. |
GetGenerator(Workspace, String) |
Gets the SyntaxGenerator for the specified language. |
GetGetAccessorStatements(SyntaxNode) |
Gets the statements for the body of the get-accessor of the declaration. |
GetMembers(SyntaxNode) |
Gets the current members of the declaration. |
GetModifiers(SyntaxNode) |
Gets the DeclarationModifiers for the declaration. |
GetName(SyntaxNode) |
Gets the name of the declaration. |
GetNamespaceImports(SyntaxNode) |
Gets the namespace imports that are part of the declaration. |
GetParameters(SyntaxNode) |
Gets the list of parameters for the declaration. |
GetReturnAttributes(SyntaxNode) |
Gets the return attributes from the declaration. |
GetSetAccessorStatements(SyntaxNode) |
Gets the statements for the body of the set-accessor of the declaration. |
GetStatements(SyntaxNode) |
Gets the statements for the body of the declaration. |
GetSwitchSections(SyntaxNode) |
Gets the list of switch sections for the statement. |
GetType(SyntaxNode) |
Gets the type of the declaration. |
GreaterThanExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a greater-than test operation. |
GreaterThanOrEqualExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a greater-than-or-equal test operation. |
IdentifierName(String) |
Creates an expression that denotes a simple identifier name. |
IfStatement(SyntaxNode, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates an if-statement |
IfStatement(SyntaxNode, IEnumerable<SyntaxNode>, SyntaxNode) |
Creates an if statement |
IndexerDeclaration(IEnumerable<SyntaxNode>, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates an indexer declaration. |
IndexerDeclaration(IPropertySymbol, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates an indexer declaration matching an existing indexer symbol. |
IndexOf<T>(IReadOnlyList<T>, T) | |
InsertAccessors(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the accessors inserted. |
InsertAttributeArguments(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of the attribute with the arguments inserted. |
InsertAttributes(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the attributes inserted. |
InsertAttributes(SyntaxNode, Int32, SyntaxNode[]) |
Creates a new instance of the declaration with the attributes inserted. |
InsertMembers(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the members inserted. |
InsertMembers(SyntaxNode, Int32, SyntaxNode[]) |
Creates a new instance of the declaration with the members inserted. |
InsertNamespaceImports(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of the declaration with the namespace imports inserted. |
InsertNamespaceImports(SyntaxNode, Int32, SyntaxNode[]) |
Creates a new instance of the declaration with the namespace imports inserted. |
InsertNodesAfter(SyntaxNode, SyntaxNode, IEnumerable<SyntaxNode>) |
Inserts the new node before the specified declaration. |
InsertNodesBefore(SyntaxNode, SyntaxNode, IEnumerable<SyntaxNode>) |
Inserts the new node before the specified declaration. |
InsertParameters(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Inserts the parameters at the specified index into the declaration. |
InsertReturnAttributes(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Creates a new instance of a method declaration with return attributes inserted. |
InsertReturnAttributes(SyntaxNode, Int32, SyntaxNode[]) |
Creates a new instance of a method declaration with return attributes inserted. |
InsertSwitchSections(SyntaxNode, Int32, IEnumerable<SyntaxNode>) |
Inserts the switch sections at the specified index into the statement. |
InterfaceDeclaration(String, IEnumerable<String>, Accessibility, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a interface declaration. |
InvocationExpression(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a invocation expression. |
InvocationExpression(SyntaxNode, SyntaxNode[]) |
Creates a invocation expression |
IsTypeExpression(SyntaxNode, ITypeSymbol) |
Creates an expression that denotes an is-type-check operation. |
IsTypeExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes an is-type-check operation. |
LambdaParameter(String, ITypeSymbol) |
Creates a lambda parameter. |
LambdaParameter(String, SyntaxNode) |
Creates a lambda parameter. |
LessThanExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a less-than test operation. |
LessThanOrEqualExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a less-than-or-equal test operation. |
LiteralExpression(Object) |
Creates a literal expression. This is typically numeric primitives, strings or chars. |
LocalDeclarationStatement(ITypeSymbol, String, SyntaxNode, Boolean) |
Creates a statement that declares a single local variable. |
LocalDeclarationStatement(String, SyntaxNode) |
Creates a statement that declares a single local variable. |
LocalDeclarationStatement(SyntaxNode, String, SyntaxNode, Boolean) |
Creates a statement that declares a single local variable. |
LockStatement(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a statement that represents a lock-block pattern. |
LogicalAndExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a logical-and operation. |
LogicalNotExpression(SyntaxNode) |
Creates an expression that denotes a logical not operation. |
LogicalOrExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a logical-or operation. |
MemberAccessExpression(SyntaxNode, String) |
Creates a member access expression. |
MemberAccessExpression(SyntaxNode, SyntaxNode) |
Creates a member access expression. |
MemberBindingExpression(SyntaxNode) |
Creates an expression that denotes a member binding operation. |
MethodDeclaration(IMethodSymbol, IEnumerable<SyntaxNode>) |
Creates a method declaration matching an existing method symbol. |
MethodDeclaration(String, IEnumerable<SyntaxNode>, IEnumerable<String>, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>) |
Creates a method declaration. |
ModuloExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a modulo operation. |
MultiplyExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a multiplication operation. |
NameExpression(INamespaceOrTypeSymbol) |
Creates a name that denotes a type or namespace. |
NameOfExpression(SyntaxNode) |
Creates an nameof expression. |
NamespaceDeclaration(String, IEnumerable<SyntaxNode>) |
Creates a namespace declaration. |
NamespaceDeclaration(String, SyntaxNode[]) |
Creates a namespace declaration. |
NamespaceDeclaration(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a namespace declaration. |
NamespaceDeclaration(SyntaxNode, SyntaxNode[]) |
Creates a namespace declaration. |
NamespaceImportDeclaration(String) |
Creates a namespace import declaration. |
NamespaceImportDeclaration(SyntaxNode) |
Creates a namespace import declaration. |
NegateExpression(SyntaxNode) |
Creates an expression that denotes a unary negation operation. |
NullableTypeExpression(SyntaxNode) |
Creates an expression that denotes a nullable type. |
NullLiteralExpression() |
Creates an expression that denotes the null literal. |
ObjectCreationExpression(ITypeSymbol, IEnumerable<SyntaxNode>) |
Creates an object creation expression. |
ObjectCreationExpression(ITypeSymbol, SyntaxNode[]) |
Creates an object creation expression. |
ObjectCreationExpression(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates an object creation expression. |
ObjectCreationExpression(SyntaxNode, SyntaxNode[]) |
Creates an object creation expression. |
OperatorDeclaration(IMethodSymbol, IEnumerable<SyntaxNode>) |
Creates a operator or conversion declaration matching an existing method symbol. |
OperatorDeclaration(OperatorKind, IEnumerable<SyntaxNode>, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>) |
Creates a method declaration. |
ParameterDeclaration(IParameterSymbol, SyntaxNode) |
Creates a parameter declaration matching an existing parameter symbol. |
ParameterDeclaration(String, SyntaxNode, SyntaxNode, RefKind) |
Creates a parameter declaration. |
PreserveTrivia<TNode>(TNode, Func<TNode,SyntaxNode>) | |
PropertyDeclaration(IPropertySymbol, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a property declaration using an existing property symbol as a signature. |
PropertyDeclaration(String, SyntaxNode, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a property declaration. The property will have a |
QualifiedName(SyntaxNode, SyntaxNode) |
Creates a name expression that denotes a qualified name. The left operand can be any name expression. The right operand can be either and identifier or generic name. |
ReferenceEqualsExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a reference-type equality test operation. |
ReferenceNotEqualsExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a reference-type inequality test operation. |
RemoveAllAttributes(SyntaxNode) |
Removes all attributes from the declaration, including return attributes. |
RemoveEventHandler(SyntaxNode, SyntaxNode) |
Creates a statement that removes the given handler from the given event. |
RemoveNode(SyntaxNode, SyntaxNode, SyntaxRemoveOptions) |
Removes the node from the sub tree starting at the root. |
RemoveNode(SyntaxNode, SyntaxNode) |
Removes the node from the sub tree starting at the root. |
RemoveNodes(SyntaxNode, IEnumerable<SyntaxNode>) |
Removes all the declarations from the sub tree starting at the root. |
RemoveRange<TNode>(SeparatedSyntaxList<TNode>, Int32, Int32) | |
RemoveRange<TNode>(SyntaxList<TNode>, Int32, Int32) | |
ReplaceNode(SyntaxNode, SyntaxNode, SyntaxNode) |
Replaces the node in the root's tree with the new node. |
ReplaceRange(SyntaxNode, SyntaxNode, IEnumerable<SyntaxNode>) | |
ReplaceWithTrivia(SyntaxNode, SyntaxNode, SyntaxNode) | |
ReplaceWithTrivia(SyntaxNode, SyntaxToken, SyntaxToken) | |
ReplaceWithTrivia<TNode>(SyntaxNode, TNode, Func<TNode,SyntaxNode>) | |
ReturnStatement(SyntaxNode) |
Creates a statement that can be used to return a value from a method body. |
SetAccessorDeclaration(Accessibility, IEnumerable<SyntaxNode>) | |
StructDeclaration(String, IEnumerable<String>, Accessibility, DeclarationModifiers, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a struct declaration. |
SubtractExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes an subtraction operation. |
SwitchSection(IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a section for a switch statement. |
SwitchSection(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a single-case section a switch statement. |
SwitchStatement(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a switch statement that branches to individual sections based on the value of the specified expression. |
SwitchStatement(SyntaxNode, SyntaxNode[]) |
Creates a switch statement that branches to individual sections based on the value of the specified expression. |
ThisExpression() |
Creates an expression that denotes the containing method's this-parameter. |
ThrowExpression(SyntaxNode) |
Creates an expression that can be used to throw an exception. |
ThrowStatement(SyntaxNode) |
Creates a statement that can be used to throw an exception. |
TrueLiteralExpression() |
Creates an expression that denotes the boolean true literal. |
TryCastExpression(SyntaxNode, ITypeSymbol) |
Creates an expression that denotes an try-cast operation. |
TryCastExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes an try-cast operation. |
TryCatchStatement(IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a try-catch or try-catch-finally statement. |
TryCatchStatement(IEnumerable<SyntaxNode>, SyntaxNode[]) |
Creates a try-catch or try-catch-finally statement. |
TryFinallyStatement(IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates a try-finally statement. |
TupleElementExpression(ITypeSymbol, String) |
Creates an expression that denotes a tuple element. |
TupleElementExpression(SyntaxNode, String) |
Creates an expression that denotes a tuple element. |
TupleExpression(IEnumerable<SyntaxNode>) |
Creates an tuple expression. |
TupleTypeExpression(IEnumerable<ITypeSymbol>, IEnumerable<String>) |
Creates an expression that denotes a tuple type. |
TupleTypeExpression(IEnumerable<SyntaxNode>) |
Creates an expression that denotes a tuple type. |
TupleTypeExpression(SyntaxNode[]) |
Creates an expression that denotes a tuple type. |
TypedConstantExpression(TypedConstant) |
Creates an expression for a typed constant. |
TypeExpression(ITypeSymbol, Boolean) |
Creates an expression that denotes a type. If addImport is false, adds a Microsoft.CodeAnalysis.Simplification.DoNotAddImportsAnnotation which will prevent any imports or usings from being added for the type. |
TypeExpression(ITypeSymbol) |
Creates an expression that denotes a type. |
TypeExpression(SpecialType) |
Creates an expression that denotes a special type name. |
TypeOfExpression(SyntaxNode) |
Creates an expression that evaluates to the type at runtime. |
UsingStatement(String, SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a statement that represents a using-block pattern. |
UsingStatement(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a statement that represents a using-block pattern. |
UsingStatement(SyntaxNode, String, SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a statement that represents a using-block pattern. |
ValueEqualsExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a value-type equality test operation. |
ValueNotEqualsExpression(SyntaxNode, SyntaxNode) |
Creates an expression that denotes a value-type inequality test operation. |
ValueReturningLambdaExpression(IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates an expression that declares a value returning lambda expression. |
ValueReturningLambdaExpression(IEnumerable<SyntaxNode>, SyntaxNode) |
Creates an expression that declares a value returning lambda expression. |
ValueReturningLambdaExpression(IEnumerable<SyntaxNode>) |
Creates an expression that declares a zero parameter value returning lambda expression. |
ValueReturningLambdaExpression(String, IEnumerable<SyntaxNode>) |
Creates an expression that declares a single parameter value returning lambda expression. |
ValueReturningLambdaExpression(String, SyntaxNode) |
Creates an expression that declares a single parameter value returning lambda expression. |
ValueReturningLambdaExpression(SyntaxNode) |
Creates an expression that declares a zero parameter value returning lambda expression. |
VoidReturningLambdaExpression(IEnumerable<SyntaxNode>, IEnumerable<SyntaxNode>) |
Creates an expression that declares a void returning lambda expression. |
VoidReturningLambdaExpression(IEnumerable<SyntaxNode>, SyntaxNode) |
Creates an expression that declares a void returning lambda expression |
VoidReturningLambdaExpression(IEnumerable<SyntaxNode>) |
Creates an expression that declares a zero parameter void returning lambda expression. |
VoidReturningLambdaExpression(String, IEnumerable<SyntaxNode>) |
Creates an expression that declares a single parameter void returning lambda expression. |
VoidReturningLambdaExpression(String, SyntaxNode) |
Creates an expression that declares a single parameter void returning lambda expression. |
VoidReturningLambdaExpression(SyntaxNode) |
Creates an expression that declares a zero parameter void returning lambda expression. |
WhileStatement(SyntaxNode, IEnumerable<SyntaxNode>) |
Creates a while-loop statement |
WithAccessibility(SyntaxNode, Accessibility) |
Changes the accessibility of the declaration. |
WithAccessorDeclarations(SyntaxNode, IEnumerable<SyntaxNode>) | |
WithAccessorDeclarations(SyntaxNode, SyntaxNode[]) | |
WithExpression(SyntaxNode, SyntaxNode) |
Changes the expression associated with the declaration. |
WithGetAccessorStatements(SyntaxNode, IEnumerable<SyntaxNode>) |
Changes the statements for the body of the get-accessor of the declaration. |
WithModifiers(SyntaxNode, DeclarationModifiers) |
Changes the DeclarationModifiers for the declaration. |
WithName(SyntaxNode, String) |
Changes the name of the declaration. |
WithSetAccessorStatements(SyntaxNode, IEnumerable<SyntaxNode>) |
Changes the statements for the body of the set-accessor of the declaration. |
WithStatements(SyntaxNode, IEnumerable<SyntaxNode>) |
Changes the statements for the body of the declaration. |
WithType(SyntaxNode, SyntaxNode) |
Changes the type of the declaration. |
WithTypeArguments(SyntaxNode, IEnumerable<SyntaxNode>) |
Converts an expression that ends in a name into an expression that ends in a generic name. If the expression already ends in a generic name, the new type arguments are used instead. |
WithTypeArguments(SyntaxNode, SyntaxNode[]) |
Converts an expression that ends in a name into an expression that ends in a generic name. If the expression already ends in a generic name, the new type arguments are used instead. |
WithTypeConstraint(SyntaxNode, String, SpecialTypeConstraintKind, IEnumerable<SyntaxNode>) |
Adds a type constraint to a type parameter of a declaration. |
WithTypeConstraint(SyntaxNode, String, SpecialTypeConstraintKind, SyntaxNode[]) |
Adds a type constraint to a type parameter of a declaration. |
WithTypeConstraint(SyntaxNode, String, SyntaxNode[]) |
Adds a type constraint to a type parameter of a declaration. |
WithTypeParameters(SyntaxNode, IEnumerable<String>) |
Converts a declaration (method, class, etc) into a declaration with type parameters. |
WithTypeParameters(SyntaxNode, String[]) |
Converts a declaration (method, class, etc) into a declaration with type parameters. |
Applies to
.NET