Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Security.​Principal.​IdentityReferenceCollection
Assembly: System.Security.Principal.Windows
Inheritance: object → IdentityReferenceCollection
Implemented Interfaces
- Collections.​Generic.​ICollection`1 (Inherits: IEnumerable<​Security.​Principal.​IdentityReference>IEnumerable)
Represents a collection of <see cref="T:System.Security.Principal.IdentityReference" /> objects and provides a means of converting sets of <see cref="T:System.Security.Principal.IdentityReference" /> -derived objects to <see cref="T:System.Security.Principal.IdentityReference" /> -derived types.
Properties
public
int
Count
Gets the number of items in the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection.
public
IdentityReference
Item
Methods
public
void
Add​(IdentityReference identity)
Adds an <see cref="T:System.Security.Principal.IdentityReference" /> object to the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection.
identity
The <see cref="T:System.Security.Principal.IdentityReference" /> object to add to the collection.
public
void
Clear​()
Clears all <see cref="T:System.Security.Principal.IdentityReference" /> objects from the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection.
public
bool
Contains​(IdentityReference identity)
Indicates whether the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection contains the specified <see cref="T:System.Security.Principal.IdentityReference" /> object.
Returns <see langword="true" /> if the collection contains the specified object.
identity
The <see cref="T:System.Security.Principal.IdentityReference" /> object to check for.
public
void
CopyTo​(IdentityReference[] array,
int offset)
Copies the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection to an <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> array, starting at the specified index.
array
An <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> array object to which the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection is to be copied.
offset
The zero-based index in <paramref name="array" /> where the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection is to be copied.
public
Collections.​Generic.​IEnumerator<​IdentityReference>
GetEnumerator​()
Gets an enumerator that can be used to iterate through the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection.
Returns An enumerator for the <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection.
public
bool
Remove​(IdentityReference identity)
Removes the specified <see cref="T:System.Security.Principal.IdentityReference" /> object from the collection.
Returns <see langword="true" /> if the specified object was removed from the collection.
identity
The <see cref="T:System.Security.Principal.IdentityReference" /> object to remove.
public
IdentityReferenceCollection
Translate​(Type targetType)
Converts the objects in the collection to the specified type. Calling this method is the same as calling <see cref="M:System.Security.Principal.IdentityReferenceCollection.Translate(System.Type,System.Boolean)" /> with the second parameter set to <see langword="false" /> , which means that exceptions will not be thrown for items that fail conversion.
Returns A <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection that represents the converted contents of the original collection.
targetType
The type to which items in the collection are being converted.
public
IdentityReferenceCollection
Translate​(Type targetType,
bool forceSuccess)
Converts the objects in the collection to the specified type and uses the specified fault tolerance to handle or ignore errors associated with a type not having a conversion mapping.
Returns A <see cref="T:System.Security.Principal.IdentityReferenceCollection" /> collection that represents the converted contents of the original collection.
targetType
The type to which items in the collection are being converted.
forceSuccess
A Boolean value that determines how conversion errors are handled.
If <paramref name="forceSuccess" /> is <see langword="true" /> , conversion errors due to a mapping not being found for the translation result in a failed conversion and exceptions being thrown.
If <paramref name="forceSuccess" /> is <see langword="false" /> , types that failed to convert due to a mapping not being found for the translation are copied without being converted into the collection being returned.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object