IdentityReference.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Principal / IdentityReference.cs / 1 / IdentityReference.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 

using System; 
using System.Security.Policy; // defines Url class 
using System.Globalization;
 
namespace System.Security.Principal
{
[System.Runtime.InteropServices.ComVisible(false)]
    public abstract class IdentityReference 
    {
        internal IdentityReference() 
        { 
            // exists to prevent creation user-derived classes (for now)
        } 

//      public abstract string Scheme { get; }

        public abstract string Value { get; } 

//      public virtual Url Url 
//      { 
//          get { return new Url(""); } //
 

        public abstract bool IsValidTargetType( Type targetType );

        public abstract IdentityReference Translate( Type targetType ); 

        public override abstract bool Equals( object o ); 
 
        public override abstract int GetHashCode();
 
        public override abstract string ToString();

        public static bool operator==( IdentityReference left, IdentityReference right )
        { 
            object l = left;
            object r = right; 
 
            if ( l == null && r == null )
            { 
                return true;
            }
            else if ( l == null || r == null )
            { 
                return false;
            } 
            else 
            {
                return left.Equals( right ); 
            }
        }

        public static bool operator!=( IdentityReference left, IdentityReference right ) 
        {
            return !( left == right ); // invoke operator== 
        } 
    }
} 


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK