/// <summary> /// Tests equality between this XRI and another XRI. /// </summary> public override bool Equals(object obj) { XriIdentifier other = obj as XriIdentifier; if (other == null) { return(false); } return(this.CanonicalXri == other.CanonicalXri); }
public static Identifier Parse(string identifier) { if (string.IsNullOrEmpty(identifier)) { throw new ArgumentNullException("identifier"); } if (XriIdentifier.IsValidXri(identifier)) { return(new XriIdentifier(identifier)); } else { return(new UriIdentifier(identifier)); } }
public static bool IsValid(string identifier) { return(XriIdentifier.IsValidXri(identifier) || UriIdentifier.IsValidUri(identifier)); }
/// <summary> /// Performs discovery on THIS identifier, but generates <see cref="ServiceEndpoint"/> /// instances that treat another given identifier as the user-supplied identifier. /// </summary> internal IEnumerable <ServiceEndpoint> Discover(XriIdentifier userSuppliedIdentifier) { return(downloadXrds().CreateServiceEndpoints(userSuppliedIdentifier)); }