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.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Loretta.CodeAnalysis
    Assembly: Loretta.CodeAnalysis.dll
    Syntax
    public readonly struct SyntaxNodeOrTokenList

    Constructors

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    SyntaxNodeOrTokenList(IEnumerable<SyntaxNodeOrToken>)

    Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.

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

    The sequence of nodes and tokens

    Properties

    | Improve this Doc View Source

    Count

    Gets the count of nodes in this list

    Declaration
    public readonly int Count { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

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

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

    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

    | Improve this Doc View Source

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

    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
    System.Collections.IEnumerable<SyntaxNodeOrToken> nodesOrTokens

    The nodes or tokens to add.

    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

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

    First()

    Gets the first SyntaxNodeOrToken structure from this list.

    Declaration
    public readonly SyntaxNodeOrToken First()
    Returns
    Type Description
    SyntaxNodeOrToken
    | Improve this Doc View Source

    FirstOrDefault()

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

    Declaration
    public readonly SyntaxNodeOrToken FirstOrDefault()
    Returns
    Type Description
    SyntaxNodeOrToken
    | Improve this Doc View Source

    GetEnumerator()

    Gets the enumerator.

    Declaration
    public readonly SyntaxNodeOrTokenList.Enumerator GetEnumerator()
    Returns
    Type Description
    SyntaxNodeOrTokenList.Enumerator
    | Improve this Doc View Source

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

    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

    | Improve this Doc View Source

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

    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.

    System.Collections.IEnumerable<SyntaxNodeOrToken> nodesAndTokens

    The nodes or tokens to insert.

    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    Last()

    Gets the last SyntaxNodeOrToken structure from this list.

    Declaration
    public readonly SyntaxNodeOrToken Last()
    Returns
    Type Description
    SyntaxNodeOrToken
    | Improve this Doc View Source

    LastOrDefault()

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

    Declaration
    public readonly SyntaxNodeOrToken LastOrDefault()
    Returns
    Type Description
    SyntaxNodeOrToken
    | Improve this Doc View Source

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

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

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

    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.

    System.Collections.IEnumerable<SyntaxNodeOrToken> newNodesAndTokens

    The new nodes and tokens.

    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IEnumerable.GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    readonly IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An System.Collections.IEnumerator object that can be used to iterate through the collection.

    Implements

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

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾