public int GetHashCode(UrlI3 obj) { return(_url.origin.Eq.Singleton.GetHashCode(obj.origin) & _url.resource.Eq.Singleton.GetHashCode(nilnul.web.Url3.Resource(obj)) ); //throw new NotImplementedException(); }
public bool Equals(UrlI3 x, UrlI3 y) { return(_url.origin.Eq.Singleton.Equals(x.origin, y.origin) && _url.resource.Eq.Singleton.Equals(nilnul.web.Url3.Resource(x), nilnul.web.Url3.Resource(y)) ); //throw new NotImplementedException(); }
public static nilnul.web._url._origin._authority._socket.host_.named_._domained._domain.Brand Brand(UrlI3 url) { var host = url.origin.authority.socket.host; switch (host) { case nilnul.web._url._origin._authority._socket.host_.NamedI named: switch (named) { case nilnul.web._url._origin._authority._socket.host_.named_.DomainedI domained: return(domained.domain.brand); break; default: throw new UnexpectedTypeException($"{url} is of type {typeof(nilnul.web._url._origin._authority._socket.host_.NamedI)} but not {typeof(nilnul.web._url._origin._authority._socket.host_.named_.DomainedI)}, such that no Brand can be retrieved."); break; } break; default: throw new UnexpectedTypeException($"{url} is not of type {typeof(nilnul.web._url._origin._authority._socket.host_.NamedI)} (may be of type IP?), so no Brand can be retrieved."); break; } }
public static string Txt(UrlI3 url) { return(TxtNul(url) ?? ""); }
public static string TxtNul(UrlI3 url) { return(nilnul.web._url._resource._render.route.nulable._TipX.TxtNul( url.route )); }
public static nilnul.web._url._origin._authority._socket.host_.named_._domained.Domain Domain(UrlI3 url) { return(nilnul.web._url._origin._authority._socket.host._DomainX.Domain( url.origin.authority.socket.host )); }
public Url3(UrlI3 url) : this(url.origin, url.route, url.query, url.fragment) { }
static public ResourceI Resource(UrlI3 url) => new _url.Resource(url.route, url.query, url.fragment);