public Context() { this.baseUri = new Lazy <Uri>(() => { UriComponents authority = (UriComponents.Scheme | UriComponents.UserInfo | UriComponents.Host | UriComponents.Port); return(new Uri(RequestUri.GetComponents(authority, UriFormat.SafeUnescaped))); }); }
internal virtual Bucket CreateRequest() { Encoding enc = RequestEncoding; #pragma warning disable CA2000 // Dispose objects before losing scope return(enc.GetBytes((Method ?? "GET") + " ").AsBucket() + enc.GetBytes(RequestUri.GetComponents(UriComponents.PathAndQuery, UriFormat.UriEscaped)).AsBucket() + enc.GetBytes(" HTTP/1.1\r\n").AsBucket() + CreateHeaders(RequestUri.Host)); #pragma warning restore CA2000 // Dispose objects before losing scope }
private protected override BucketClientChannel CreateChannel(Bucket reader, IBucketWriter writer) { return(new BucketClientChannel(Client, RequestUri.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped), reader, writer)); }