29 return _Identities[index];
37 _Identities[index] = value;
74 _Identities.
Add(identity);
91 _Identities.
Remove(identity);
111 if (identity ==
null)
115 return _Identities.
Contains(identity);
122 return GetEnumerator();
129 return new IdentityReferenceEnumerator(
this);
137 return Translate(targetType, forceSuccess:
false);
144 [SecuritySafeCritical]
148 if (targetType ==
null)
156 if (Identities.
Count == 0)
162 for (
int i = 0; i < Identities.
Count; i++)
164 Type type = Identities[i].GetType();
165 if (type == targetType)
187 identityReferenceCollection =
this;
196 identityReferenceCollection2 =
this;
206 for (
int j = 0; j < Identities.
Count; j++)
209 Type type2 = identityReference.GetType();
210 if (type2 == targetType)
216 identityReferenceCollection.
Add(identityReference);
221 identityReferenceCollection2.
Add(identityReference);
227 bool someFailed =
false;
233 if (flag && (!forceSuccess || !someFailed))
235 identityReferenceCollection3 = identityReferenceCollection4;
240 identityReferenceCollection5 =
NTAccount.
Translate(identityReferenceCollection2, targetType, out someFailed);
241 if (flag && (!forceSuccess || !someFailed))
243 identityReferenceCollection3 = identityReferenceCollection5;
246 if (forceSuccess && someFailed)
249 if (identityReferenceCollection4 !=
null)
253 if (item.GetType() != targetType)
255 identityReferenceCollection3.
Add(item);
259 if (identityReferenceCollection5 !=
null)
263 if (item2.GetType() != targetType)
265 identityReferenceCollection3.
Add(item2);
276 for (
int k = 0; k < Identities.
Count; k++)
279 Type type3 = identityReference2.GetType();
280 if (type3 == targetType)
282 identityReferenceCollection3.
Add(identityReference2);
287 identityReferenceCollection3.
Add(identityReferenceCollection4[num++]);
292 identityReferenceCollection3.
Add(identityReferenceCollection5[num2++]);
298 return identityReferenceCollection3;
bool Remove(IdentityReference identity)
Removes the specified T:System.Security.Principal.IdentityReference object from the collection.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Describes a set of security permissions applied to code. This class cannot be inherited.
int Count
Gets the number of elements contained in the T:System.Collections.Generic.List`1.
Represents an identity and is the base class for the T:System.Security.Principal.NTAccount and T:Syst...
Serves as the base class for system exceptions namespace.
bool IsReadOnly
Gets a value that indicates whether the T:System.Security.Principal.IdentityReferenceCollection colle...
void Add(IdentityReference identity)
Adds an T:System.Security.Principal.IdentityReference object to the T:System.Security....
Represents an exception for a principal whose identity could not be mapped to a known identity.
int Count
Gets the number of items in the T:System.Security.Principal.IdentityReferenceCollection collection.
IdentityReferenceCollection(int capacity)
Initializes a new instance of the T:System.Security.Principal.IdentityReferenceCollection class by us...
void Clear()
Clears all T:System.Security.Principal.IdentityReference objects from the T:System....
Represents a user or group account.
virtual bool IsSubclassOf(Type c)
Determines whether the current T:System.Type derives from the specified T:System.Type.
void Add(T item)
Adds an object to the end of the T:System.Collections.Generic.List`1.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Exposes an enumerator, which supports a simple iteration over a non-generic collection....
Provides information about, and means to manipulate, the current environment and platform....
Represents type declarations: class types, interface types, array types, value types,...
IdentityReferenceCollection Translate(Type targetType, bool forceSuccess)
Converts the objects in the collection to the specified type and uses the specified fault tolerance t...
bool Contains(T item)
Determines whether an element is in the T:System.Collections.Generic.List`1.
Represents a collection of T:System.Security.Principal.IdentityReference objects and provides a means...
IdentityReferenceCollection Translate(Type targetType)
Converts the objects in the collection to the specified type. Calling this method is the same as call...
IEnumerator GetEnumerator()
Returns an enumerator that iterates through a collection.
The exception that is thrown when one of the arguments provided to a method is not valid.
void Clear()
Removes all elements from the T:System.Collections.Generic.List`1.
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
IEnumerator< IdentityReference > GetEnumerator()
Gets an enumerator that can be used to iterate through the T:System.Security.Principal....
Represents a security identifier (SID) and provides marshaling and comparison operations for SIDs.
bool Contains(IdentityReference identity)
Indicates whether the T:System.Security.Principal.IdentityReferenceCollection collection contains the...
override IdentityReference Translate(Type targetType)
Translates the account name represented by the T:System.Security.Principal.NTAccount object into anot...
Defines size, enumerators, and synchronization methods for all nongeneric collections.
IdentityReferenceCollection()
Initializes a new instance of the T:System.Security.Principal.IdentityReferenceCollection class with ...
Supports a simple iteration over a non-generic collection.
void CopyTo(T[] array)
Copies the entire T:System.Collections.Generic.List`1 to a compatible one-dimensional array,...
void CopyTo(IdentityReference[] array, int offset)
Copies the T:System.Security.Principal.IdentityReferenceCollection collection to an T:System....
bool Remove(T item)
Removes the first occurrence of a specific object from the T:System.Collections.Generic....
override IdentityReference Translate(Type targetType)
Translates the account name represented by the T:System.Security.Principal.SecurityIdentifier object ...