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:
System.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 System.Object is equal to the current System.Object.

public override bool Equals(object obj)
Parameter Type Description
obj System.Object

The System.Object to compare with the current System.Object.

Returns

System.Boolean:

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

Exceptions

Type Condition
System.NullReferenceException

The obj parameter is null.

GetHashCode()

Serves as a hash function for a particular type.

public override int GetHashCode()

Returns

System.Int32:

A hash code for the current System.Object.

ToString()

Converts the object to a String.

public override string ToString()

Returns

System.String:

A string whose value represents this object.

Inherited Members

  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetType()
  • System.Object.MemberwiseClone()