blob: 498ae455fa40a5659281c99c7b8de759bf35c7f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
//-----------------------------------------------------------------------
// <copyright file="IdentifierContract.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.OpenId {
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OpenId.RelyingParty;
/// <summary>
/// Code Contract for the <see cref="Identifier"/> class.
/// </summary>
[ContractClassFor(typeof(Identifier))]
internal abstract class IdentifierContract : Identifier {
/// <summary>
/// Prevents a default instance of the IdentifierContract class from being created.
/// </summary>
private IdentifierContract()
: base(null, false) {
}
/// <summary>
/// Performs discovery on the Identifier.
/// </summary>
/// <param name="requestHandler">The web request handler to use for discovery.</param>
/// <returns>
/// An initialized structure containing the discovered provider endpoint information.
/// </returns>
internal override IEnumerable<ServiceEndpoint> Discover(IDirectWebRequestHandler requestHandler) {
Contract.Requires<ArgumentNullException>(requestHandler != null);
Contract.Ensures(Contract.Result<IEnumerable<ServiceEndpoint>>() != null);
throw new NotImplementedException();
}
/// <summary>
/// Returns an <see cref="Identifier"/> that has no URI fragment.
/// Quietly returns the original <see cref="Identifier"/> if it is not
/// a <see cref="UriIdentifier"/> or no fragment exists.
/// </summary>
/// <returns>
/// A new <see cref="Identifier"/> instance if there was a
/// fragment to remove, otherwise this same instance..
/// </returns>
internal override Identifier TrimFragment() {
Contract.Ensures(Contract.Result<Identifier>() != null);
throw new NotImplementedException();
}
/// <summary>
/// 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.
/// </summary>
/// <param name="secureIdentifier">The newly created secure identifier.
/// If the conversion fails, <paramref name="secureIdentifier"/> retains
/// <i>this</i> identifiers identity, but will never discover any endpoints.</param>
/// <returns>
/// True if the secure conversion was successful.
/// False if the Identifier was originally created with an explicit HTTP scheme.
/// </returns>
internal override bool TryRequireSsl(out Identifier secureIdentifier) {
Contract.Ensures(Contract.ValueAtReturn(out secureIdentifier) != null);
throw new NotImplementedException();
}
}
}
|