using System;
using System.Runtime.InteropServices;
namespace System.Security.Principal
{
/// Represents an identity and is the base class for the and classes. This class does not provide a public constructor, and therefore cannot be inherited.
// Token: 0x020005AE RID: 1454
[ComVisible(false)]
public abstract class IdentityReference
{
// Token: 0x06003527 RID: 13607 RVA: 0x000B6F44 File Offset: 0x000B5144
internal IdentityReference()
{
}
/// Gets the string value of the identity represented by the object.
/// The string value of the identity represented by the object.
// Token: 0x17000A6F RID: 2671
// (get) Token: 0x06003528 RID: 13608
public abstract string Value { get; }
/// Returns a value that indicates whether the specified object equals this instance of the class.
/// true if is an object with the same underlying type and value as this instance; otherwise, false.
/// An object to compare with this instance, or a null reference.
// Token: 0x06003529 RID: 13609
public abstract override bool Equals(object o);
/// Serves as a hash function for . is suitable for use in hashing algorithms and data structures like a hash table.
/// The hash code for this object.
// Token: 0x0600352A RID: 13610
public abstract override int GetHashCode();
/// Returns a value that indicates whether the specified type is a valid translation type for the class.
/// true if is a valid translation type for the class; otherwise, false.
/// The type being queried for validity to serve as a conversion from . The following target types are valid:
// Token: 0x0600352B RID: 13611
public abstract bool IsValidTargetType(Type targetType);
/// Returns the string representation of the identity represented by the object.
/// The identity in string format.
// Token: 0x0600352C RID: 13612
public abstract override string ToString();
/// Translates the account name represented by the object into another -derived type.
/// The converted identity.
/// The target type for the conversion from .
// Token: 0x0600352D RID: 13613
public abstract IdentityReference Translate(Type targetType);
/// Compares two objects to determine whether they are equal. They are considered equal if they have the same canonical name representation as the one returned by the property or if they are both null.
/// true if and are equal; otherwise, false.
/// The left operand to use for the equality comparison. This parameter can be null.
/// The right operand to use for the equality comparison. This parameter can be null.
// Token: 0x0600352E RID: 13614 RVA: 0x000B6F4C File Offset: 0x000B514C
public static bool operator ==(IdentityReference left, IdentityReference right)
{
if (left == null)
{
return right == null;
}
return right != null && left.Value == right.Value;
}
/// Compares two objects to determine whether they are not equal. They are considered not equal if they have different canonical name representations than the one returned by the property or if one of the objects is null and the other is not.
/// true if and are not equal; otherwise, false.
/// The left operand to use for the inequality comparison. This parameter can be null.
/// The right operand to use for the inequality comparison. This parameter can be null.
// Token: 0x0600352F RID: 13615 RVA: 0x000B6F80 File Offset: 0x000B5180
public static bool operator !=(IdentityReference left, IdentityReference right)
{
if (left == null)
{
return right != null;
}
return right == null || left.Value != right.Value;
}
}
}