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.​IdentityReference
Assembly: System.Security.Principal.Windows
Inheritance: object → IdentityReference
Represents an identity and is the base class for the <see cref="T:System.Security.Principal.NTAccount" /> and <see cref="T:System.Security.Principal.SecurityIdentifier" /> classes. This class does not provide a public constructor, and therefore cannot be inherited.
Properties
public
string
Value
Gets the string value of the identity represented by the <see cref="T:System.Security.Principal.IdentityReference" /> object.
Methods
public
bool
Equals​(object o)
Returns a value that indicates whether the specified object equals this instance of the <see cref="T:System.Security.Principal.IdentityReference" /> class.
Returns <see langword="true" /> if <paramref name="o" /> is an object with the same underlying type and value as this <see cref="T:System.Security.Principal.IdentityReference" /> instance; otherwise, <see langword="false" /> .
o
An object to compare with this <see cref="T:System.Security.Principal.IdentityReference" /> instance, or a null reference.
public
int
GetHashCode​()
Serves as a hash function for <see cref="T:System.Security.Principal.IdentityReference" /> . <see cref="M:System.Security.Principal.IdentityReference.GetHashCode" /> is suitable for use in hashing algorithms and data structures like a hash table.
Returns The hash code for this <see cref="T:System.Security.Principal.IdentityReference" /> object.
public
bool
IsValidTargetType​(Type targetType)
Returns a value that indicates whether the specified type is a valid translation type for the <see cref="T:System.Security.Principal.IdentityReference" /> class.
Returns <see langword="true" /> if <paramref name="targetType" /> is a valid translation type for the <see cref="T:System.Security.Principal.IdentityReference" /> class; otherwise, <see langword="false" /> .
targetType
The type being queried for validity to serve as a conversion from <see cref="T:System.Security.Principal.IdentityReference" /> . The following target types are valid:
<see cref="T:System.Security.Principal.NTAccount" /> <see cref="T:System.Security.Principal.SecurityIdentifier" /> .
public
string
ToString​()
Returns the string representation of the identity represented by the <see cref="T:System.Security.Principal.IdentityReference" /> object.
Returns The identity in string format.
public
IdentityReference
Translate​(Type targetType)
Translates the account name represented by the <see cref="T:System.Security.Principal.IdentityReference" /> object into another <see cref="T:System.Security.Principal.IdentityReference" /> -derived type.
Returns The converted identity.
targetType
The target type for the conversion from <see cref="T:System.Security.Principal.IdentityReference" /> .
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object