Search Results for

    Show / Hide Table of Contents

    Struct TextChange

    Describes a single change when a particular span is replaced with a new text.

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

    Constructors

    TextChange(TextSpan, String)

    Initializes a new instance of TextChange

    Declaration
    public TextChange(TextSpan span, string newText)
    Parameters
    Type Name Description
    TextSpan span

    The original span of the changed text.

    System.String newText

    The new text.

    Properties

    NewText

    The new text.

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

    NoChanges

    An empty set of changes.

    Declaration
    public static readonly IReadOnlyList<TextChange> NoChanges { get; }
    Property Value
    Type Description
    IReadOnlyList<TextChange>

    Span

    The original span of the changed text.

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

    Methods

    Equals(TextChange)

    Declaration
    public readonly bool Equals(TextChange other)
    Parameters
    Type Name Description
    TextChange other
    Returns
    Type Description
    System.Boolean

    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)

    GetHashCode()

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

    ToString()

    Provides a string representation for TextChange.

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

    Operators

    Equality(TextChange, TextChange)

    Checks whether two text changes are equal.

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

    Implicit(TextChange to TextChangeRange)

    Converts a TextChange to a TextChangeRange.

    Declaration
    public static implicit operator TextChangeRange(TextChange change)
    Parameters
    Type Name Description
    TextChange change
    Returns
    Type Description
    TextChangeRange

    Inequality(TextChange, TextChange)

    Checks whether two text changes are not equal.

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

    Implements

    IEquatable<>
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾