Search Results for

    Show / Hide Table of Contents

    Class AnnotationExtensions

    Extension methods for dealing with annotations.

    Inheritance
    System.Object
    AnnotationExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Loretta.CodeAnalysis
    Assembly: Loretta.CodeAnalysis.dll
    Syntax
    public static class AnnotationExtensions

    Methods

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾