scripts
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Security.Permissions
|
||||
{
|
||||
/// <summary>Represents a collection of <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> objects. This class cannot be inherited.</summary>
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the collection to a compatible one-dimensional array, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional array that is the destination of the elements copied from the current collection.</param>
|
||||
/// <param name="index">The index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than the lower bound of <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the collection is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060031EA RID: 12778 RVA: 0x000AB84C File Offset: 0x000A9A4C
|
||||
void ICollection.CopyTo(Array array, int index)
|
||||
{
|
||||
this._list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator" /> object that can be used to iterate through the objects in the collection.</summary>
|
||||
/// <returns>A <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x060031EB RID: 12779 RVA: 0x000AB85C File Offset: 0x000A9A5C
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return new KeyContainerPermissionAccessEntryEnumerator(this._list);
|
||||
}
|
||||
|
||||
/// <summary>Gets the number of items in the collection.</summary>
|
||||
/// <returns>The number of <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> objects in the collection.</returns>
|
||||
// Token: 0x170009C6 RID: 2502
|
||||
// (get) Token: 0x060031EC RID: 12780 RVA: 0x000AB86C File Offset: 0x000A9A6C
|
||||
public int Count
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the collection is synchronized (thread safe).</summary>
|
||||
/// <returns>false in all cases.</returns>
|
||||
// Token: 0x170009C7 RID: 2503
|
||||
// (get) Token: 0x060031ED RID: 12781 RVA: 0x000AB87C File Offset: 0x000A9A7C
|
||||
public bool IsSynchronized
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the item at the specified index in the collection.</summary>
|
||||
/// <returns>The <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object at the specified index in the collection.</returns>
|
||||
/// <param name="index">The zero-based index of the element to access.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is greater than or equal to the collection count. </exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">
|
||||
/// <paramref name="index" /> is negative. </exception>
|
||||
// Token: 0x170009C8 RID: 2504
|
||||
public KeyContainerPermissionAccessEntry this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return (KeyContainerPermissionAccessEntry)this._list[index];
|
||||
}
|
||||
}
|
||||
|
||||
/// <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: 0x170009C9 RID: 2505
|
||||
// (get) Token: 0x060031EF RID: 12783 RVA: 0x000AB894 File Offset: 0x000A9A94
|
||||
public object SyncRoot
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Adds a <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object to the collection.</summary>
|
||||
/// <returns>The index at which the new element was inserted.</returns>
|
||||
/// <param name="accessEntry">The <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object to add.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="accessEntry" /> is null.</exception>
|
||||
// Token: 0x060031F0 RID: 12784 RVA: 0x000AB898 File Offset: 0x000A9A98
|
||||
public int Add(KeyContainerPermissionAccessEntry accessEntry)
|
||||
{
|
||||
return this._list.Add(accessEntry);
|
||||
}
|
||||
|
||||
/// <summary>Removes all the <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> objects from the collection.</summary>
|
||||
// Token: 0x060031F1 RID: 12785 RVA: 0x000AB8A8 File Offset: 0x000A9AA8
|
||||
public void Clear()
|
||||
{
|
||||
this._list.Clear();
|
||||
}
|
||||
|
||||
/// <summary>Copies the elements of the collection to a compatible one-dimensional array, starting at the specified index of the target array.</summary>
|
||||
/// <param name="array">The one-dimensional <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> array that is the destination of the elements copied from the current collection. </param>
|
||||
/// <param name="index">The index in <paramref name="array" /> at which copying begins. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="array" /> is null. </exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="index" /> is less than the lower bound of <paramref name="array" />. </exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="array" /> is multidimensional.-or- The number of elements in the collection is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />. </exception>
|
||||
// Token: 0x060031F2 RID: 12786 RVA: 0x000AB8B8 File Offset: 0x000A9AB8
|
||||
public void CopyTo(KeyContainerPermissionAccessEntry[] array, int index)
|
||||
{
|
||||
this._list.CopyTo(array, index);
|
||||
}
|
||||
|
||||
/// <summary>Returns a <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator" /> object that can be used to iterate through the objects in the collection.</summary>
|
||||
/// <returns>A <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntryEnumerator" /> object that can be used to iterate through the collection.</returns>
|
||||
// Token: 0x060031F3 RID: 12787 RVA: 0x000AB8C8 File Offset: 0x000A9AC8
|
||||
public KeyContainerPermissionAccessEntryEnumerator GetEnumerator()
|
||||
{
|
||||
return new KeyContainerPermissionAccessEntryEnumerator(this._list);
|
||||
}
|
||||
|
||||
/// <summary>Gets the index in the collection of the specified <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object, if it exists in the collection.</summary>
|
||||
/// <returns>The index of the specified <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object in the collection, or –1 if no match is found.</returns>
|
||||
/// <param name="accessEntry">The <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object to locate.</param>
|
||||
// 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;
|
||||
}
|
||||
|
||||
/// <summary>Removes the specified <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object from thecollection.</summary>
|
||||
/// <param name="accessEntry">The <see cref="T:System.Security.Permissions.KeyContainerPermissionAccessEntry" /> object to remove.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="accessEntry" /> is null.</exception>
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user