Search Results for

    Show / Hide Table of Contents

    Class SyntaxAnnotation

    A SyntaxAnnotation is used to annotate syntax elements with additional information.

    Since syntax elements are immutable, annotating them requires creating new instances of them with the annotations attached.

    Inheritance
    System.Object
    SyntaxAnnotation
    Implements
    IEquatable<SyntaxAnnotation>
    Namespace: Loretta.CodeAnalysis
    Assembly: Loretta.CodeAnalysis.dll
    Syntax
    public sealed class SyntaxAnnotation : IObjectWritable

    Constructors

    | Improve this Doc View Source

    SyntaxAnnotation()

    Creates a new empty annotation.

    Declaration
    public SyntaxAnnotation()
    | Improve this Doc View Source

    SyntaxAnnotation(String)

    Creates a new annotation without a value.

    Declaration
    public SyntaxAnnotation(string kind)
    Parameters
    Type Name Description
    System.String kind
    | Improve this Doc View Source

    SyntaxAnnotation(String, String)

    Creates a new annotation.

    Declaration
    public SyntaxAnnotation(string kind, string data)
    Parameters
    Type Name Description
    System.String kind
    System.String data

    Properties

    | Improve this Doc View Source

    Data

    The annotation's data.

    Declaration
    public string Data { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ElasticAnnotation

    A predefined syntax annotation that indicates whether the syntax element has elastic trivia.

    Declaration
    public static SyntaxAnnotation ElasticAnnotation { get; }
    Property Value
    Type Description
    SyntaxAnnotation
    | Improve this Doc View Source

    Kind

    The kind of annotation.

    Declaration
    public string Kind { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Equals(SyntaxAnnotation)

    Declaration
    public bool Equals(SyntaxAnnotation other)
    Parameters
    Type Name Description
    SyntaxAnnotation other
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Operators

    | Improve this Doc View Source

    Equality(SyntaxAnnotation, SyntaxAnnotation)

    Checks whether two annotations are equal.

    Declaration
    public static bool operator ==(SyntaxAnnotation left, SyntaxAnnotation right)
    Parameters
    Type Name Description
    SyntaxAnnotation left
    SyntaxAnnotation right
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Inequality(SyntaxAnnotation, SyntaxAnnotation)

    Checks whether two annotations are not equal.

    Declaration
    public static bool operator !=(SyntaxAnnotation left, SyntaxAnnotation right)
    Parameters
    Type Name Description
    SyntaxAnnotation left
    SyntaxAnnotation right
    Returns
    Type Description
    System.Boolean

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾