3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 // <OWNER>Microsoft</OWNER>
10 using System.Security.Policy; // defines Url class
11 using System.Globalization;
12 using System.Diagnostics.Contracts;
14 namespace System.Security.Principal
16 [System.Runtime.InteropServices.ComVisible(false)]
17 public abstract class IdentityReference
19 internal IdentityReference()
21 // exists to prevent creation user-derived classes (for now)
24 // public abstract string Scheme { get; }
26 public abstract string Value { get; }
28 // public virtual Url Url
30 // get { return new Url(""); } //
33 public abstract bool IsValidTargetType( Type targetType );
35 public abstract IdentityReference Translate( Type targetType );
37 public override abstract bool Equals( object o );
39 public override abstract int GetHashCode();
41 public override abstract string ToString();
43 public static bool operator==( IdentityReference left, IdentityReference right )
48 if ( l == null && r == null )
52 else if ( l == null || r == null )
58 return left.Equals( right );
62 public static bool operator!=( IdentityReference left, IdentityReference right )
64 return !( left == right ); // invoke operator==