Search Results for

    Show / Hide Table of Contents

    Struct TextLine

    Information about the character boundaries of a single line of text.

    Implements
    IEquatable<TextLine>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Loretta.CodeAnalysis.Text
    Assembly: Loretta.CodeAnalysis.dll
    Syntax
    public readonly struct TextLine

    Properties

    | Improve this Doc View Source

    End

    Gets the end position of the line not including the line break.

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

    EndIncludingLineBreak

    Gets the end position of the line including the line break.

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

    LineNumber

    Gets the zero-based line number.

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

    Span

    Gets the line span not including the line break.

    Declaration
    public readonly TextSpan Span { get; }
    Property Value
    Type Description
    TextSpan
    | Improve this Doc View Source

    SpanIncludingLineBreak

    Gets the line span including the line break.

    Declaration
    public readonly TextSpan SpanIncludingLineBreak { get; }
    Property Value
    Type Description
    TextSpan
    | Improve this Doc View Source

    Start

    Gets the start position of the line.

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

    Text

    Gets the source text.

    Declaration
    public readonly SourceText Text { get; }
    Property Value
    Type Description
    SourceText

    Methods

    | Improve this Doc View Source

    Equals(TextLine)

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

    Equals(Object)

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

    FromSpan(SourceText, TextSpan)

    Creates a TextLine instance.

    Declaration
    public static TextLine FromSpan(SourceText text, TextSpan span)
    Parameters
    Type Name Description
    SourceText text

    The source text.

    TextSpan span

    The span of the line.

    Returns
    Type Description
    TextLine

    An instance of TextLine.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Returns the text for this line.

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

    Operators

    | Improve this Doc View Source

    Equality(TextLine, TextLine)

    Checks whether two text lines are equal.

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

    Inequality(TextLine, TextLine)

    Checks whether two text lines are not equal.

    Declaration
    public static bool operator !=(TextLine left, TextLine right)
    Parameters
    Type Name Description
    TextLine left
    TextLine 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

    ☀
    ☾