Esempio n. 1
0
        public override RpcClient Build()
        {
            var requestSerializer = this.RequestSerializer ?? new DefaultRequestJsonSerializer();
            var transportClient   = new HttpRpcTransportClient(
                encoding: this.options.Encoding,
                contentType: this.options.ContentType,
                headers: this.options.Headers,
                streamCompressor: this.streamCompressor,
                httpAuthHeaderFactory: this.httpAuthHeaderFactory);

            return(new RpcClient(this.BaseUrl, requestSerializer, transportClient, this.Events));
        }
Esempio n. 2
0
        public RpcClient Build()
        {
            var streamCompressor  = new DefaultStreamCompressor();
            var httpClientFactory = new DefaultHttpClientFactory();
            var transportClient   = new HttpRpcTransportClient(
                streamCompressor,
                httpClientFactory,
                encoding: this.options.Encoding,
                contentType: this.options.ContentType,
                headers: this.options.Headers,
                httpAuthHeaderFactory: this.httpAuthHeaderFactory);
            var requestSerializer = new DefaultRequestJsonSerializer(this.jsonSerializerSettings);

            return(new RpcClient(this.BaseUrl, transportClient, requestSerializer, this.Events));
        }