using System;
using System.Collections;
namespace System.Security.Cryptography
{
/// Represents a collection of objects. This class cannot be inherited.
// Token: 0x020002A8 RID: 680
public sealed class OidCollection : ICollection, IEnumerable
{
/// Initializes a new instance of the class.
// Token: 0x060018D3 RID: 6355 RVA: 0x00055310 File Offset: 0x00053510
public OidCollection()
{
this._list = new ArrayList();
}
/// Copies the object into an array.
/// The array to copy the object to.
/// The location where the copy operation starts.
///
/// cannot be a multidimensional array.-or-The length of is an invalid offset length.
///
/// is null.
/// The value of is out range.
// Token: 0x060018D4 RID: 6356 RVA: 0x00055324 File Offset: 0x00053524
void ICollection.CopyTo(Array array, int index)
{
this._list.CopyTo(array, index);
}
/// Returns an object that can be used to navigate the object.
/// An object that can be used to navigate the collection.
// Token: 0x060018D5 RID: 6357 RVA: 0x00055334 File Offset: 0x00053534
IEnumerator IEnumerable.GetEnumerator()
{
return new OidEnumerator(this);
}
/// Gets the number of objects in a collection.
/// The number of objects in a collection.
// Token: 0x170007C5 RID: 1989
// (get) Token: 0x060018D6 RID: 6358 RVA: 0x0005533C File Offset: 0x0005353C
public int Count
{
get
{
return this._list.Count;
}
}
/// Gets a value that indicates whether access to the object is thread safe.
/// false in all cases.
// Token: 0x170007C6 RID: 1990
// (get) Token: 0x060018D7 RID: 6359 RVA: 0x0005534C File Offset: 0x0005354C
public bool IsSynchronized
{
get
{
return this._list.IsSynchronized;
}
}
/// Gets an object from the object.
/// An object.
/// The location of the object in the collection.
// Token: 0x170007C7 RID: 1991
public Oid this[int index]
{
get
{
return (Oid)this._list[index];
}
}
/// Gets the first object that contains a value of the property or a value of the property that matches the specified string value from the object.
/// An object.
/// A string that represents a property or a property.
// Token: 0x170007C8 RID: 1992
public Oid this[string oid]
{
get
{
foreach (object obj in this._list)
{
Oid oid2 = (Oid)obj;
if (oid2.Value == oid)
{
return oid2;
}
}
return null;
}
}
/// Gets an object that can be used to synchronize access to the object.
/// An object that can be used to synchronize access to the object.
// Token: 0x170007C9 RID: 1993
// (get) Token: 0x060018DA RID: 6362 RVA: 0x000553F4 File Offset: 0x000535F4
public object SyncRoot
{
get
{
return this._list.SyncRoot;
}
}
/// Adds an object to the object.
/// The index of the added object.
/// The object to add to the collection.
// Token: 0x060018DB RID: 6363 RVA: 0x00055404 File Offset: 0x00053604
public int Add(Oid oid)
{
return (!this._readOnly) ? this._list.Add(oid) : 0;
}
/// Copies the object into an array.
/// The array to copy the object into.
/// The location where the copy operation starts.
// Token: 0x060018DC RID: 6364 RVA: 0x00055424 File Offset: 0x00053624
public void CopyTo(Oid[] array, int index)
{
this._list.CopyTo(array, index);
}
/// Returns an object that can be used to navigate the object.
/// An object.
// Token: 0x060018DD RID: 6365 RVA: 0x00055434 File Offset: 0x00053634
public OidEnumerator GetEnumerator()
{
return new OidEnumerator(this);
}
// Token: 0x170007CA RID: 1994
// (get) Token: 0x060018DE RID: 6366 RVA: 0x0005543C File Offset: 0x0005363C
// (set) Token: 0x060018DF RID: 6367 RVA: 0x00055444 File Offset: 0x00053644
internal bool ReadOnly
{
get
{
return this._readOnly;
}
set
{
this._readOnly = value;
}
}
// Token: 0x060018E0 RID: 6368 RVA: 0x00055450 File Offset: 0x00053650
internal OidCollection ReadOnlyCopy()
{
OidCollection oidCollection = new OidCollection();
foreach (object obj in this._list)
{
Oid oid = (Oid)obj;
oidCollection.Add(oid);
}
oidCollection._readOnly = true;
return oidCollection;
}
// Token: 0x040013BD RID: 5053
private ArrayList _list;
// Token: 0x040013BE RID: 5054
private bool _readOnly;
}
}