Class AnnotationExtensions
Extension methods for dealing with annotations.
Inheritance
System.Object
AnnotationExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Loretta.CodeAnalysis
Assembly: cs.temp.dll.dll
Syntax
public static class AnnotationExtensions
Methods
WithAdditionalAnnotations<TNode>(TNode, IEnumerable<SyntaxAnnotation>)
Creates a new node identical to this node with the specified annotations attached.
Declaration
public static TNode WithAdditionalAnnotations<TNode>(this TNode node, IEnumerable<SyntaxAnnotation> annotations)
where TNode : SyntaxNode
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Original node. |
| IEnumerable<SyntaxAnnotation> | annotations | Annotations to be added to the new node. |
Returns
| Type | Description |
|---|---|
| TNode |
Type Parameters
| Name | Description |
|---|---|
| TNode |
WithAdditionalAnnotations<TNode>(TNode, SyntaxAnnotation[])
Creates a new node identical to this node with the specified annotations attached.
Declaration
public static TNode WithAdditionalAnnotations<TNode>(this TNode node, params SyntaxAnnotation[] annotations)
where TNode : SyntaxNode
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Original node. |
| SyntaxAnnotation[] | annotations | Annotations to be added to the new node. |
Returns
| Type | Description |
|---|---|
| TNode |
Type Parameters
| Name | Description |
|---|---|
| TNode |
WithoutAnnotations<TNode>(TNode, IEnumerable<SyntaxAnnotation>)
Creates a new node identical to this node with the specified annotations removed.
Declaration
public static TNode WithoutAnnotations<TNode>(this TNode node, IEnumerable<SyntaxAnnotation> annotations)
where TNode : SyntaxNode
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Original node. |
| IEnumerable<SyntaxAnnotation> | annotations | Annotations to be removed from the new node. |
Returns
| Type | Description |
|---|---|
| TNode |
Type Parameters
| Name | Description |
|---|---|
| TNode |
WithoutAnnotations<TNode>(TNode, SyntaxAnnotation[])
Creates a new node identical to this node with the specified annotations removed.
Declaration
public static TNode WithoutAnnotations<TNode>(this TNode node, params SyntaxAnnotation[] annotations)
where TNode : SyntaxNode
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Original node. |
| SyntaxAnnotation[] | annotations | Annotations to be removed from the new node. |
Returns
| Type | Description |
|---|---|
| TNode |
Type Parameters
| Name | Description |
|---|---|
| TNode |
WithoutAnnotations<TNode>(TNode, String)
Creates a new node identical to this node with the annotations of the specified kind removed.
Declaration
public static TNode WithoutAnnotations<TNode>(this TNode node, string annotationKind)
where TNode : SyntaxNode
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Original node. |
| System.String | annotationKind | The kind of annotation to remove. |
Returns
| Type | Description |
|---|---|
| TNode |
Type Parameters
| Name | Description |
|---|---|
| TNode |