Search Results for

    Show / Hide Table of Contents

    Struct SyntaxNodeOrTokenList

    A list of SyntaxNodeOrToken structures.

    Implements
    IEquatable<SyntaxNodeOrTokenList>
    IReadOnlyCollection<SyntaxNodeOrToken>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Loretta.CodeAnalysis
    Assembly: cs.temp.dll.dll
    Syntax
    public readonly struct SyntaxNodeOrTokenList

    Constructors

    SyntaxNodeOrTokenList(IEnumerable<SyntaxNodeOrToken>)

    Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.

    Declaration
    public SyntaxNodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
    Parameters
    Type Name Description
    IEnumerable<SyntaxNodeOrToken> nodesAndTokens

    The sequence of nodes and tokens

    SyntaxNodeOrTokenList(SyntaxNodeOrToken[])

    Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.

    Declaration
    public SyntaxNodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
    Parameters
    Type Name Description
    SyntaxNodeOrToken[] nodesAndTokens

    The nodes and tokens

    Properties

    Count

    Gets the count of nodes in this list

    Declaration
    public readonly int Count { get; }
    Property Value
    Type Description
    System.Int32

    FullSpan

    The absolute span of the list elements in characters, including the leading and trailing trivia of the first and last elements.

    Declaration
    public readonly TextSpan FullSpan { get; }
    Property Value
    Type Description
    TextSpan

    Item[Int32]

    Gets the SyntaxNodeOrToken at the specified index.

    Declaration
    public readonly SyntaxNodeOrToken this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    SyntaxNodeOrToken

    Span

    The absolute span of the list elements in characters, not including the leading and trailing trivia of the first and last elements.

    Declaration
    public readonly TextSpan Span { get; }
    Property Value
    Type Description
    TextSpan

    Methods

    Add(SyntaxNodeOrToken)

    Creates a new SyntaxNodeOrTokenList with the specified node or token added to the end.

    Declaration
    public readonly SyntaxNodeOrTokenList Add(SyntaxNodeOrToken nodeOrToken)
    Parameters
    Type Name Description
    SyntaxNodeOrToken nodeOrToken

    The node or token to add.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    AddRange(IEnumerable<SyntaxNodeOrToken>)

    Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens added to the end.

    Declaration
    public readonly SyntaxNodeOrTokenList AddRange(IEnumerable<SyntaxNodeOrToken> nodesOrTokens)
    Parameters
    Type Name Description
    IEnumerable<SyntaxNodeOrToken> nodesOrTokens

    The nodes or tokens to add.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    Any()

    Indicates whether there is any element in the list.

    Declaration
    public readonly bool Any()
    Returns
    Type Description
    System.Boolean

    true if there are any elements in the list, else false.

    Equals(SyntaxNodeOrTokenList)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public readonly bool Equals(SyntaxNodeOrTokenList other)
    Parameters
    Type Name Description
    SyntaxNodeOrTokenList other

    An object to compare with this object.

    Returns
    Type Description
    System.Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this instance.

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with this instance.

    Returns
    Type Description
    System.Boolean

    true if the specified System.Object is equal to this instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    First()

    Gets the first SyntaxNodeOrToken structure from this list.

    Declaration
    public readonly SyntaxNodeOrToken First()
    Returns
    Type Description
    SyntaxNodeOrToken

    FirstOrDefault()

    Gets the first SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).

    Declaration
    public readonly SyntaxNodeOrToken FirstOrDefault()
    Returns
    Type Description
    SyntaxNodeOrToken

    GetEnumerator()

    Gets the enumerator.

    Declaration
    public readonly SyntaxNodeOrTokenList.Enumerator GetEnumerator()
    Returns
    Type Description
    SyntaxNodeOrTokenList.Enumerator

    GetHashCode()

    Returns a hash code for this instance.

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

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    System.ValueType.GetHashCode()

    IndexOf(SyntaxNodeOrToken)

    Returns the index from the list for the given SyntaxNodeOrToken.

    Declaration
    public readonly int IndexOf(SyntaxNodeOrToken nodeOrToken)
    Parameters
    Type Name Description
    SyntaxNodeOrToken nodeOrToken

    The node or token to search for in the list.

    Returns
    Type Description
    System.Int32

    The index of the found nodeOrToken, or -1 if it wasn't found

    Insert(Int32, SyntaxNodeOrToken)

    Creates a new SyntaxNodeOrTokenList with the specified node or token inserted at the index.

    Declaration
    public readonly SyntaxNodeOrTokenList Insert(int index, SyntaxNodeOrToken nodeOrToken)
    Parameters
    Type Name Description
    System.Int32 index

    The index to insert at.

    SyntaxNodeOrToken nodeOrToken

    The node or token to insert.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    InsertRange(Int32, IEnumerable<SyntaxNodeOrToken>)

    Creates a new SyntaxNodeOrTokenList with the specified nodes or tokens inserted at the index.

    Declaration
    public readonly SyntaxNodeOrTokenList InsertRange(int index, IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
    Parameters
    Type Name Description
    System.Int32 index

    The index to insert at.

    IEnumerable<SyntaxNodeOrToken> nodesAndTokens

    The nodes or tokens to insert.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    Last()

    Gets the last SyntaxNodeOrToken structure from this list.

    Declaration
    public readonly SyntaxNodeOrToken Last()
    Returns
    Type Description
    SyntaxNodeOrToken

    LastOrDefault()

    Gets the last SyntaxNodeOrToken structure from this list if present, else default(SyntaxNodeOrToken).

    Declaration
    public readonly SyntaxNodeOrToken LastOrDefault()
    Returns
    Type Description
    SyntaxNodeOrToken

    Remove(SyntaxNodeOrToken)

    Creates a new SyntaxNodeOrTokenList with the specified element removed.

    Declaration
    public readonly SyntaxNodeOrTokenList Remove(SyntaxNodeOrToken nodeOrTokenInList)
    Parameters
    Type Name Description
    SyntaxNodeOrToken nodeOrTokenInList

    The element to remove.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    RemoveAt(Int32)

    Creates a new SyntaxNodeOrTokenList with the element at the specified index removed.

    Declaration
    public readonly SyntaxNodeOrTokenList RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the element to remove.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    Replace(SyntaxNodeOrToken, SyntaxNodeOrToken)

    Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new node or token.

    Declaration
    public readonly SyntaxNodeOrTokenList Replace(SyntaxNodeOrToken nodeOrTokenInList, SyntaxNodeOrToken newNodeOrToken)
    Parameters
    Type Name Description
    SyntaxNodeOrToken nodeOrTokenInList

    The element to replace.

    SyntaxNodeOrToken newNodeOrToken

    The new node or token.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    ReplaceRange(SyntaxNodeOrToken, IEnumerable<SyntaxNodeOrToken>)

    Creates a new SyntaxNodeOrTokenList with the specified element replaced with a new nodes and tokens.

    Declaration
    public readonly SyntaxNodeOrTokenList ReplaceRange(SyntaxNodeOrToken nodeOrTokenInList, IEnumerable<SyntaxNodeOrToken> newNodesAndTokens)
    Parameters
    Type Name Description
    SyntaxNodeOrToken nodeOrTokenInList

    The element to replace.

    IEnumerable<SyntaxNodeOrToken> newNodesAndTokens

    The new nodes and tokens.

    Returns
    Type Description
    SyntaxNodeOrTokenList

    ToFullString()

    Returns the full string representation of the nodes and tokens in this list including the first node or token's leading trivia and the last node or token's trailing trivia.

    Declaration
    public readonly string ToFullString()
    Returns
    Type Description
    System.String

    The full string representation of the nodes and tokens in this list including the first node or token's leading trivia and the last node or token's trailing trivia.

    ToString()

    Returns the string representation of the nodes and tokens in this list, not including the first node or token's leading trivia and the last node or token's trailing trivia.

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    System.String

    The string representation of the nodes and tokens in this list, not including the first node or token's leading trivia and the last node or token's trailing trivia.

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(SyntaxNodeOrTokenList, SyntaxNodeOrTokenList)

    Implements the operator ==.

    Declaration
    public static bool operator ==(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right)
    Parameters
    Type Name Description
    SyntaxNodeOrTokenList left

    The left SyntaxNodeOrTokenList

    SyntaxNodeOrTokenList right

    The right SyntaxNodeOrTokenList

    Returns
    Type Description
    System.Boolean

    true if both lists equal, else false.

    Inequality(SyntaxNodeOrTokenList, SyntaxNodeOrTokenList)

    Implements the operator !=.

    Declaration
    public static bool operator !=(SyntaxNodeOrTokenList left, SyntaxNodeOrTokenList right)
    Parameters
    Type Name Description
    SyntaxNodeOrTokenList left

    The left SyntaxNodeOrTokenList

    SyntaxNodeOrTokenList right

    The right SyntaxNodeOrTokenList

    Returns
    Type Description
    System.Boolean

    true if both lists not equal, else false.

    Implements

    IEquatable<>
    IReadOnlyCollection<>
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾