114 lines
4.0 KiB
C#
114 lines
4.0 KiB
C#
using System;
|
|
using System.Collections;
|
|
|
|
namespace System.Text.RegularExpressions
|
|
{
|
|
/// <summary>Represents the set of captures made by a single capturing group.</summary>
|
|
// Token: 0x020002AC RID: 684
|
|
[Serializable]
|
|
public class CaptureCollection : ICollection, IEnumerable
|
|
{
|
|
// Token: 0x060018F5 RID: 6389 RVA: 0x00055A00 File Offset: 0x00053C00
|
|
internal CaptureCollection(int n)
|
|
{
|
|
this.list = new Capture[n];
|
|
}
|
|
|
|
/// <summary>Gets the number of substrings captured by the group.</summary>
|
|
/// <returns>The number of items in the <see cref="T:System.Text.RegularExpressions.CaptureCollection" />.</returns>
|
|
// Token: 0x170007D1 RID: 2001
|
|
// (get) Token: 0x060018F6 RID: 6390 RVA: 0x00055A14 File Offset: 0x00053C14
|
|
public int Count
|
|
{
|
|
get
|
|
{
|
|
return this.list.Length;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value that indicates whether the collection is read only.</summary>
|
|
/// <returns>true in all cases.</returns>
|
|
// Token: 0x170007D2 RID: 2002
|
|
// (get) Token: 0x060018F7 RID: 6391 RVA: 0x00055A20 File Offset: 0x00053C20
|
|
public bool IsReadOnly
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets a value indicating whether access to the collection is synchronized (thread-safe).</summary>
|
|
/// <returns>false in all cases.</returns>
|
|
// Token: 0x170007D3 RID: 2003
|
|
// (get) Token: 0x060018F8 RID: 6392 RVA: 0x00055A24 File Offset: 0x00053C24
|
|
public bool IsSynchronized
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/// <summary>Gets an individual member of the collection.</summary>
|
|
/// <returns>The captured substring at position <paramref name="i" /> in the collection.</returns>
|
|
/// <param name="i">Index into the capture collection. </param>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="i" /> is less than 0 or greater than <see cref="P:System.Text.RegularExpressions.CaptureCollection.Count" />. </exception>
|
|
// Token: 0x170007D4 RID: 2004
|
|
public Capture this[int i]
|
|
{
|
|
get
|
|
{
|
|
if (i < 0 || i >= this.Count)
|
|
{
|
|
throw new ArgumentOutOfRangeException("Index is out of range");
|
|
}
|
|
return this.list[i];
|
|
}
|
|
}
|
|
|
|
// Token: 0x060018FA RID: 6394 RVA: 0x00055A5C File Offset: 0x00053C5C
|
|
internal void SetValue(Capture cap, int i)
|
|
{
|
|
this.list[i] = cap;
|
|
}
|
|
|
|
/// <summary>Gets an object that can be used to synchronize access to the collection.</summary>
|
|
/// <returns>An object that can be used to synchronize access to the collection.</returns>
|
|
// Token: 0x170007D5 RID: 2005
|
|
// (get) Token: 0x060018FB RID: 6395 RVA: 0x00055A68 File Offset: 0x00053C68
|
|
public object SyncRoot
|
|
{
|
|
get
|
|
{
|
|
return this.list;
|
|
}
|
|
}
|
|
|
|
/// <summary>Copies all the elements of the collection to the given array beginning at the given index.</summary>
|
|
/// <param name="array">The array the collection is to be copied into. </param>
|
|
/// <param name="arrayIndex">The position in the destination array where copying is to begin. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="array " />is null.</exception>
|
|
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
|
/// <paramref name="arrayIndex" /> is outside the bounds of <paramref name="array" />. -or-<paramref name="arrayIndex" /> plus <see cref="P:System.Text.RegularExpressions.CaptureCollection.Count" /> is outside the bounds of <paramref name="array" />. </exception>
|
|
// Token: 0x060018FC RID: 6396 RVA: 0x00055A70 File Offset: 0x00053C70
|
|
public void CopyTo(Array array, int index)
|
|
{
|
|
this.list.CopyTo(array, index);
|
|
}
|
|
|
|
/// <summary>Provides an enumerator that iterates through the collection.</summary>
|
|
/// <returns>An object that contains all <see cref="T:System.Text.RegularExpressions.Capture" /> objects within the <see cref="T:System.Text.RegularExpressions.CaptureCollection" />.</returns>
|
|
// Token: 0x060018FD RID: 6397 RVA: 0x00055A80 File Offset: 0x00053C80
|
|
public IEnumerator GetEnumerator()
|
|
{
|
|
return this.list.GetEnumerator();
|
|
}
|
|
|
|
// Token: 0x040013C5 RID: 5061
|
|
private Capture[] list;
|
|
}
|
|
}
|