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

    Constructors

    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    NewText

    The new text.

    Declaration
    [DataMember(Order = 1)]
    public readonly string NewText { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    NoChanges

    An empty set of changes.

    Declaration
    public static readonly IReadOnlyList<TextChange> NoChanges { get; }
    Property Value
    Type Description
    IReadOnlyList<TextChange>
    | Improve this Doc View Source

    Span

    The original span of the changed text.

    Declaration
    [DataMember(Order = 0)]
    public readonly TextSpan Span { get; }
    Property Value
    Type Description
    TextSpan

    Methods

    | Improve this Doc View Source

    Equals(TextChange)

    Declaration
    public readonly bool Equals(TextChange other)
    Parameters
    Type Name Description
    TextChange 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

    GetHashCode()

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

    ToString()

    Provides a string representation for TextChange.

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

    Operators

    | Improve this Doc View Source

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

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

    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<>
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾