C# Class DotNetOpenAuth.OpenId.Realm

Show file Open project: OneCare/dotnetopenid Class Usage Examples

Private Properties

Property Type Description
Contains bool
Contains bool
Discover DotNetOpenAuth.Xrds.XrdsDocument
DiscoverReturnToEndpoints IEnumerable
ObjectInvariant void
Realm System
Realm System
Realm System
SafeUriBuilderToString string

Public Methods

Method Description
Equals ( object obj ) : bool

Checks whether one Realm is equal to another.

GetHashCode ( ) : int

Returns the hash code used for storing this object in a hash table.

Realm ( Uri realmUrl ) : System

Initializes a new instance of the Realm class.

ToString ( ) : string

Returns the string form of this Realm.

Private Methods

Method Description
Contains ( Uri url ) : bool

Validates a URL against this trust root.

Contains ( string url ) : bool

Validates a URL against this trust root.

Discover ( IDirectWebRequestHandler requestHandler, bool allowRedirects ) : DotNetOpenAuth.Xrds.XrdsDocument

Searches for an XRDS document at the realm URL.

DiscoverReturnToEndpoints ( IDirectWebRequestHandler requestHandler, bool allowRedirects ) : IEnumerable

Searches for an XRDS document at the realm URL, and if found, searches for a description of a relying party endpoints (OpenId login pages).

ObjectInvariant ( ) : void
Realm ( ) : System

Initializes static members of the Realm class.

Realm ( UriBuilder realmUriBuilder ) : System

Initializes a new instance of the Realm class.

This is useful because UriBuilder can construct a host with a wildcard in the Host property, but once there it can't be converted to a Uri.

Realm ( string realmUrl ) : System
SafeUriBuilderToString ( UriBuilder realmUriBuilder ) : string

Calls UriBuilder.ToString if the argument is non-null. Otherwise throws ArgumentNullException.

This simple method is worthwhile because it checks for null before dereferencing the UriBuilder. Since this is called from within a constructor's base(...) call, this avoids a NullReferenceException when we should be throwing an ArgumentNullException.

Method Details

Equals() public method

Checks whether one Realm is equal to another.
/// The parameter is null. ///
public Equals ( object obj ) : bool
obj object The to compare with the current .
return bool

GetHashCode() public method

Returns the hash code used for storing this object in a hash table.
public GetHashCode ( ) : int
return int

Realm() public method

Initializes a new instance of the Realm class.
public Realm ( Uri realmUrl ) : System
realmUrl System.Uri The realm URL of the Relying Party.
return System

ToString() public method

Returns the string form of this Realm.
public ToString ( ) : string
return string