Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XriIdentifier"/> class.
 /// </summary>
 /// <param name="xri">The XRI that this Identifier will represent.</param>
 /// <param name="requireSsl">
 /// If set to <c>true</c>, discovery and the initial authentication redirect will
 /// only succeed if it can be done entirely using SSL.
 /// </param>
 internal XriIdentifier(string xri, bool requireSsl)
     : base(xri, requireSsl)
 {
     Requires.NotNullOrEmpty(xri, "xri");
     RequiresEx.Format(IsValidXri(xri), OpenIdStrings.InvalidXri);
     Assumes.True(xri != null);             // Proven by IsValidXri
     this.OriginalXri  = xri;
     this.canonicalXri = CanonicalizeXri(xri);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XriIdentifier"/> class.
 /// </summary>
 /// <param name="xri">The string value of the XRI.</param>
 internal XriIdentifier(string xri)
     : this(xri, false)
 {
     Requires.NotNullOrEmpty(xri, "xri");
     RequiresEx.Format(IsValidXri(xri), OpenIdStrings.InvalidXri);
 }