using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.Security.Permissions
{
/// Represents a collection of objects. This class cannot be inherited.
// Token: 0x02000556 RID: 1366
[ComVisible(true)]
[Serializable]
public sealed class KeyContainerPermissionAccessEntryCollection : IEnumerable, ICollection
{
// Token: 0x060031E8 RID: 12776 RVA: 0x000AB7FC File Offset: 0x000A99FC
internal KeyContainerPermissionAccessEntryCollection()
{
this._list = new ArrayList();
}
// Token: 0x060031E9 RID: 12777 RVA: 0x000AB810 File Offset: 0x000A9A10
internal KeyContainerPermissionAccessEntryCollection(KeyContainerPermissionAccessEntry[] entries)
{
if (entries != null)
{
foreach (KeyContainerPermissionAccessEntry keyContainerPermissionAccessEntry in entries)
{
this.Add(keyContainerPermissionAccessEntry);
}
}
}
/// Copies the elements of the collection to a compatible one-dimensional array, starting at the specified index of the target array.
/// The one-dimensional array that is the destination of the elements copied from the current collection.
/// The index in at which copying begins.
///
/// is null.
///
/// is less than the lower bound of .
///
/// is multidimensional.-or- The number of elements in the collection is greater than the available space from to the end of the destination .
// Token: 0x060031EA RID: 12778 RVA: 0x000AB84C File Offset: 0x000A9A4C
void ICollection.CopyTo(Array array, int index)
{
this._list.CopyTo(array, index);
}
/// Returns a object that can be used to iterate through the objects in the collection.
/// A object that can be used to iterate through the collection.
// Token: 0x060031EB RID: 12779 RVA: 0x000AB85C File Offset: 0x000A9A5C
IEnumerator IEnumerable.GetEnumerator()
{
return new KeyContainerPermissionAccessEntryEnumerator(this._list);
}
/// Gets the number of items in the collection.
/// The number of objects in the collection.
// Token: 0x170009C6 RID: 2502
// (get) Token: 0x060031EC RID: 12780 RVA: 0x000AB86C File Offset: 0x000A9A6C
public int Count
{
get
{
return this._list.Count;
}
}
/// Gets a value indicating whether the collection is synchronized (thread safe).
/// false in all cases.
// Token: 0x170009C7 RID: 2503
// (get) Token: 0x060031ED RID: 12781 RVA: 0x000AB87C File Offset: 0x000A9A7C
public bool IsSynchronized
{
get
{
return false;
}
}
/// Gets the item at the specified index in the collection.
/// The object at the specified index in the collection.
/// The zero-based index of the element to access.
///
/// is greater than or equal to the collection count.
///
/// is negative.
// Token: 0x170009C8 RID: 2504
public KeyContainerPermissionAccessEntry this[int index]
{
get
{
return (KeyContainerPermissionAccessEntry)this._list[index];
}
}
/// 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: 0x170009C9 RID: 2505
// (get) Token: 0x060031EF RID: 12783 RVA: 0x000AB894 File Offset: 0x000A9A94
public object SyncRoot
{
get
{
return this;
}
}
/// Adds a object to the collection.
/// The index at which the new element was inserted.
/// The object to add.
///
/// is null.
// Token: 0x060031F0 RID: 12784 RVA: 0x000AB898 File Offset: 0x000A9A98
public int Add(KeyContainerPermissionAccessEntry accessEntry)
{
return this._list.Add(accessEntry);
}
/// Removes all the objects from the collection.
// Token: 0x060031F1 RID: 12785 RVA: 0x000AB8A8 File Offset: 0x000A9AA8
public void Clear()
{
this._list.Clear();
}
/// Copies the elements of the collection to a compatible one-dimensional array, starting at the specified index of the target array.
/// The one-dimensional array that is the destination of the elements copied from the current collection.
/// The index in at which copying begins.
///
/// is null.
///
/// is less than the lower bound of .
///
/// is multidimensional.-or- The number of elements in the collection is greater than the available space from to the end of the destination .
// Token: 0x060031F2 RID: 12786 RVA: 0x000AB8B8 File Offset: 0x000A9AB8
public void CopyTo(KeyContainerPermissionAccessEntry[] array, int index)
{
this._list.CopyTo(array, index);
}
/// Returns a object that can be used to iterate through the objects in the collection.
/// A object that can be used to iterate through the collection.
// Token: 0x060031F3 RID: 12787 RVA: 0x000AB8C8 File Offset: 0x000A9AC8
public KeyContainerPermissionAccessEntryEnumerator GetEnumerator()
{
return new KeyContainerPermissionAccessEntryEnumerator(this._list);
}
/// Gets the index in the collection of the specified object, if it exists in the collection.
/// The index of the specified object in the collection, or –1 if no match is found.
/// The object to locate.
// Token: 0x060031F4 RID: 12788 RVA: 0x000AB8D8 File Offset: 0x000A9AD8
public int IndexOf(KeyContainerPermissionAccessEntry accessEntry)
{
if (accessEntry == null)
{
throw new ArgumentNullException("accessEntry");
}
for (int i = 0; i < this._list.Count; i++)
{
if (accessEntry.Equals(this._list[i]))
{
return i;
}
}
return -1;
}
/// Removes the specified object from thecollection.
/// The object to remove.
///
/// is null.
// Token: 0x060031F5 RID: 12789 RVA: 0x000AB92C File Offset: 0x000A9B2C
public void Remove(KeyContainerPermissionAccessEntry accessEntry)
{
if (accessEntry == null)
{
throw new ArgumentNullException("accessEntry");
}
for (int i = 0; i < this._list.Count; i++)
{
if (accessEntry.Equals(this._list[i]))
{
this._list.RemoveAt(i);
}
}
}
// Token: 0x0400147A RID: 5242
private ArrayList _list;
}
}