In This Article

TagSnapshotRange<T> Class

Implements an object that represents an ITag and its associated TextSnapshotRange.

public class TagSnapshotRange<T> where T : ITag
Type Parameters:
T -

The type of tag associated with this range.

Inheritance:
object object

Constructors

TagSnapshotRange(TextSnapshotRange, T)

Initializes a new instance of the TagSnapshotRange class.

public TagSnapshotRange(TextSnapshotRange snapshotRange, T tag)
Parameter Type Description
snapshotRange TextSnapshotRange

The TextSnapshotRange over which the Tag applies.

tag T

The ITag data object associated with this range.

Properties

SnapshotRange

Gets the TextSnapshotRange over which the Tag applies.

public TextSnapshotRange SnapshotRange { get; }

Property Value

TextSnapshotRange:

The TextSnapshotRange over which the Tag applies.

Tag

Gets the ITag data object associated with this range.

public T Tag { get; }

Property Value

T:

The ITag data object associated with this range.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

Exceptions

Type Condition
NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

ToString()

Converts the object to a String.

public override string ToString()

Returns

string:

A string whose value represents this object.

Inherited Members