示例#1
0
 public static ClientProxy <TService> CreateClientProxy <TService>(HttpClientOptions options, int timeoutInterval = 1200000, int hearbeatInterval = 10000)
 {
     return(new ClientProxy <TService>(new HttpOnceCallFactory(new SimpleOptions <HttpClientOptions>(options), NullLoggerFactory.Instance),
                                       new SimpleOptions <NetRpcClientOption>(new NetRpcClientOption
     {
         TimeoutInterval = timeoutInterval,
         HearbeatInterval = hearbeatInterval
     }
                                                                              ), null, NullLoggerFactory.Instance));
 }
示例#2
0
 public static ClientProxy <TService> CreateClientProxy <TService>(HttpClientOptions options, int timeoutInterval = 1200000, int hearbeatInterval = 10000)
     where TService : class
 {
     return(new ClientProxy <TService>(new HttpOnceCallFactory(
                                           new SimpleOptions <HttpClientOptions>(options), NullLoggerFactory.Instance),
                                       new SimpleOptions <NClientOption>(new NClientOption
     {
         TimeoutInterval = timeoutInterval,
         HearbeatInterval = hearbeatInterval
     }
                                                                         ),
                                       new NullOptions <ClientMiddlewareOptions>(),
                                       ActionExecutingContextAccessor.Default,
                                       null !,
                                       NullLoggerFactory.Instance));
 }
示例#3
0
 public HttpOnceCallFactory(IOptions <HttpClientOptions> options, ILoggerFactory factory)
 {
     _options = options.Value;
     _logger  = factory.CreateLogger("NetRpc");
 }