//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.OpenId { using System; using System.Collections.Generic; using System.Diagnostics.Contracts; using DotNetOpenAuth.Messaging; /// /// Code Contract for the class. /// [ContractClassFor(typeof(Identifier))] internal abstract class IdentifierContract : Identifier { /// /// Prevents a default instance of the IdentifierContract class from being created. /// private IdentifierContract() : base(null, false) { } /// /// Returns an that has no URI fragment. /// Quietly returns the original if it is not /// a or no fragment exists. /// /// /// A new instance if there was a /// fragment to remove, otherwise this same instance.. /// internal override Identifier TrimFragment() { Contract.Ensures(Contract.Result() != null); throw new NotImplementedException(); } /// /// Converts a given identifier to its secure equivalent. /// UriIdentifiers originally created with an implied HTTP scheme change to HTTPS. /// Discovery is made to require SSL for the entire resolution process. /// /// The newly created secure identifier. /// If the conversion fails, retains /// this identifiers identity, but will never discover any endpoints. /// /// True if the secure conversion was successful. /// False if the Identifier was originally created with an explicit HTTP scheme. /// internal override bool TryRequireSsl(out Identifier secureIdentifier) { Contract.Ensures(Contract.ValueAtReturn(out secureIdentifier) != null); throw new NotImplementedException(); } } }