In This Article

IUndoableTextChangeStack Interface

Provides the base requirements for a simple last-in-first-out collection of IUndoableTextChange objects.

public interface IUndoableTextChangeStack

Properties

Capacity

Gets or sets the capacity of the stack.

int Capacity { get; set; }

Property Value

int:

The capacity of the stack.

Remarks

If a new text change added to the stack causes the stack to exceed its capacity, the text changes at the bottom of the stack are removed until the stack no longer exceeds its capacity.

Count

Gets the count of text changes on the stack.

int Count { get; }

Property Value

int:

The count of text changes on the stack.

IsAtSavePoint

Gets whether the last text change on the stack is a save point.

bool IsAtSavePoint { get; }

Property Value

bool:

true if the last text change on the stack is a save point; otherwise, false.

Methods

CopyTo(IUndoableTextChange[], int)

Copies the entire collection to a compatible one-dimensional Array, starting at the specified index of the target array.

void CopyTo(IUndoableTextChange[] array, int arrayIndex)
Parameter Type Description
array IUndoableTextChange[]

The one-dimensional IUndoableTextChange array that is the destination of the elements copied from the collection. The array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

GetTextChange(int)

Gets the IUndoableTextChange that the specified location in the stack.

IUndoableTextChange GetTextChange(int index)
Parameter Type Description
index int

The index of the text change to check.

Returns

IUndoableTextChange:

The IUndoableTextChange that the specified location in the stack.

IndexOf(IUndoableTextChange)

Returns the index of the IUndoableTextChange in the list.

int IndexOf(IUndoableTextChange textChange)
Parameter Type Description
textChange IUndoableTextChange

The IUndoableTextChange to look for in the list.

Returns

int:

The index of the IUndoableTextChange in the list, or -1 if not found.

Events

CapacityChanged

Occurs when the capacity of the stack is changed.

event EventHandler CapacityChanged

Event Type

EventHandler

StackChanged

Occurs when the contents of the stack are changed.

event EventHandler StackChanged

Event Type

EventHandler