88 lines
2.3 KiB
C#
88 lines
2.3 KiB
C#
using System;
|
|
|
|
namespace System.Text.RegularExpressions
|
|
{
|
|
/// <summary>Represents the results from a single subexpression capture. </summary>
|
|
// Token: 0x020002AB RID: 683
|
|
[Serializable]
|
|
public class Capture
|
|
{
|
|
// Token: 0x060018EE RID: 6382 RVA: 0x00055978 File Offset: 0x00053B78
|
|
internal Capture(string text)
|
|
: this(text, 0, 0)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060018EF RID: 6383 RVA: 0x00055984 File Offset: 0x00053B84
|
|
internal Capture(string text, int index, int length)
|
|
{
|
|
this.text = text;
|
|
this.index = index;
|
|
this.length = length;
|
|
}
|
|
|
|
/// <summary>The position in the original string where the first character of the captured substring was found.</summary>
|
|
/// <returns>The zero-based starting position in the original string where the captured substring was found.</returns>
|
|
// Token: 0x170007CD RID: 1997
|
|
// (get) Token: 0x060018F0 RID: 6384 RVA: 0x000559A4 File Offset: 0x00053BA4
|
|
public int Index
|
|
{
|
|
get
|
|
{
|
|
return this.index;
|
|
}
|
|
}
|
|
|
|
/// <summary>The length of the captured substring.</summary>
|
|
/// <returns>The length of the captured substring.</returns>
|
|
// Token: 0x170007CE RID: 1998
|
|
// (get) Token: 0x060018F1 RID: 6385 RVA: 0x000559AC File Offset: 0x00053BAC
|
|
public int Length
|
|
{
|
|
get
|
|
{
|
|
return this.length;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the captured substring from the input string.</summary>
|
|
/// <returns>The actual substring that was captured by the match.</returns>
|
|
// Token: 0x170007CF RID: 1999
|
|
// (get) Token: 0x060018F2 RID: 6386 RVA: 0x000559B4 File Offset: 0x00053BB4
|
|
public string Value
|
|
{
|
|
get
|
|
{
|
|
return (this.text != null) ? this.text.Substring(this.index, this.length) : string.Empty;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets the captured substring from the input string.</summary>
|
|
/// <returns>The actual substring that was captured by the match.</returns>
|
|
// Token: 0x060018F3 RID: 6387 RVA: 0x000559F0 File Offset: 0x00053BF0
|
|
public override string ToString()
|
|
{
|
|
return this.Value;
|
|
}
|
|
|
|
// Token: 0x170007D0 RID: 2000
|
|
// (get) Token: 0x060018F4 RID: 6388 RVA: 0x000559F8 File Offset: 0x00053BF8
|
|
internal string Text
|
|
{
|
|
get
|
|
{
|
|
return this.text;
|
|
}
|
|
}
|
|
|
|
// Token: 0x040013C2 RID: 5058
|
|
internal int index;
|
|
|
|
// Token: 0x040013C3 RID: 5059
|
|
internal int length;
|
|
|
|
// Token: 0x040013C4 RID: 5060
|
|
internal string text;
|
|
}
|
|
}
|