Table of Contents

Class MarkupText

Namespace
Icy.Design.Text
Assembly
IcyUI.Design.dll

An immutable snapshot of a markup document's text, with a version that grows by one with every change.

public sealed class MarkupText
Inheritance
MarkupText
Inherited Members
Extension Methods

Constructors

MarkupText(string, int)

Initializes a new instance of the MarkupText class.

public MarkupText(string text, int version = 0)

Parameters

text string

The markup text.

version int

The snapshot's version.

Exceptions

ArgumentNullException

text is null.

ArgumentOutOfRangeException

version is negative.

Properties

Text

Gets the markup text.

public string Text { get; }

Property Value

string

Version

Gets the snapshot's version.

public int Version { get; }

Property Value

int

Methods

Apply(TextChangeSet)

Applies changes and returns the next snapshot.

public MarkupText Apply(TextChangeSet changes)

Parameters

changes TextChangeSet

The changes, expressed against Text.

Returns

MarkupText

A snapshot with the changed text and the next version.

Exceptions

ArgumentNullException

changes is null.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.