using System;
using System.Collections;
namespace System.Text.RegularExpressions
{
/// Represents the set of captures made by a single capturing group.
// 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];
}
/// Gets the number of substrings captured by the group.
/// The number of items in the .
// Token: 0x170007D1 RID: 2001
// (get) Token: 0x060018F6 RID: 6390 RVA: 0x00055A14 File Offset: 0x00053C14
public int Count
{
get
{
return this.list.Length;
}
}
/// Gets a value that indicates whether the collection is read only.
/// true in all cases.
// Token: 0x170007D2 RID: 2002
// (get) Token: 0x060018F7 RID: 6391 RVA: 0x00055A20 File Offset: 0x00053C20
public bool IsReadOnly
{
get
{
return true;
}
}
/// Gets a value indicating whether access to the collection is synchronized (thread-safe).
/// false in all cases.
// Token: 0x170007D3 RID: 2003
// (get) Token: 0x060018F8 RID: 6392 RVA: 0x00055A24 File Offset: 0x00053C24
public bool IsSynchronized
{
get
{
return false;
}
}
/// Gets an individual member of the collection.
/// The captured substring at position in the collection.
/// Index into the capture collection.
///
/// is less than 0 or greater than .
// 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;
}
/// Gets an object that can be used to synchronize access to the collection.
/// An object that can be used to synchronize access to the collection.
// Token: 0x170007D5 RID: 2005
// (get) Token: 0x060018FB RID: 6395 RVA: 0x00055A68 File Offset: 0x00053C68
public object SyncRoot
{
get
{
return this.list;
}
}
/// Copies all the elements of the collection to the given array beginning at the given index.
/// The array the collection is to be copied into.
/// The position in the destination array where copying is to begin.
///
/// is null.
///
/// is outside the bounds of . -or- plus is outside the bounds of .
// Token: 0x060018FC RID: 6396 RVA: 0x00055A70 File Offset: 0x00053C70
public void CopyTo(Array array, int index)
{
this.list.CopyTo(array, index);
}
/// Provides an enumerator that iterates through the collection.
/// An object that contains all objects within the .
// Token: 0x060018FD RID: 6397 RVA: 0x00055A80 File Offset: 0x00053C80
public IEnumerator GetEnumerator()
{
return this.list.GetEnumerator();
}
// Token: 0x040013C5 RID: 5061
private Capture[] list;
}
}