Example #1
0
        public Call(Guid clientProxyId, IServiceProvider serviceProvider, ContractInfo contract, IOnceCallFactory factory, int timeoutInterval, string optionsName)
        {
            _clientProxyId   = clientProxyId;
            _serviceProvider = serviceProvider;
            _contract        = contract;
            _factory         = factory;
            _timeoutInterval = timeoutInterval;
            _optionsName     = optionsName;

            if (serviceProvider != null)
            {
                var middlewareOptions = _serviceProvider.GetService <IOptions <ClientMiddlewareOptions> >().Value;
                _middlewareBuilder = new ClientMiddlewareBuilder(middlewareOptions, serviceProvider);
            }
        }
Example #2
0
 public Call(Guid clientProxyId,
             ContractInfo contractInfo,
             IServiceProvider serviceProvider,
             ClientMiddlewareOptions middlewareOptions,
             IActionExecutingContextAccessor actionExecutingContextAccessor,
             IOnceCallFactory factory,
             int timeoutInterval,
             bool forwardHeader,
             string?optionsName)
 {
     _clientProxyId   = clientProxyId;
     _serviceProvider = serviceProvider;
     _actionExecutingContextAccessor = actionExecutingContextAccessor;
     _contract          = contractInfo;
     _factory           = factory;
     _timeoutInterval   = timeoutInterval;
     _forwardHeader     = forwardHeader;
     _optionsName       = optionsName;
     _middlewareBuilder = new ClientMiddlewareBuilder(middlewareOptions, serviceProvider);
 }