Match Class
Represents a range of matches between two sequences as a pair of spans of equal length.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Text.Differencing.Match
Namespace: Microsoft.VisualStudio.Text.Differencing
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Déclaration
Public Class Match _
Implements IEnumerable(Of Tuple), IEnumerable
public class Match : IEnumerable<Tuple>,
IEnumerable
public ref class Match : IEnumerable<Tuple^>,
IEnumerable
type Match =
class
interface IEnumerable<Tuple>
interface IEnumerable
end
public class Match implements IEnumerable<Tuple>, IEnumerable
The Match type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Match | Creates a match from two spans of equal length. |
Top
Properties
Name | Description | |
---|---|---|
Left | Get the left-side range | |
Length | Gets the length of the spans. Both spans have equal lengths. | |
Right | Gets the right span. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether two Match objects have the same left and right spans. (Overrides Object.Equals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator | Gets an enumerator typed as a Tuple<T1, T2> of integers. | |
GetHashCode | Provides a hash function. (Overrides Object.GetHashCode().) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IEnumerable.GetEnumerator | Gets an untyped enumerator. |
Top
Remarks
Given two sequences of characters:
abCCd (left)
abFFd (right)
The generated pairs of matches would be:
(0, 0), (1, 1), (4, 4)
This becomes the two Matches (left-start, right-start, length):
(0, 0, 2) and (4, 4, 1).
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.