public ClientProxy <TService> CreateProxy <TService>(string optionsName) { var options = _rabbitMQClientOptions.Get(optionsName); if (options.IsPropertiesDefault()) { return(null); } var f = new RabbitMQClientConnectionFactory(new SimpleOptions <RabbitMQClientOptions>(options), _loggerFactory); var clientProxy = new ClientProxy <TService>(f, new SimpleOptions <NetRpcClientOption>(_netRpcClientOption.CurrentValue), _serviceProvider, _loggerFactory); return(clientProxy); }
public ClientProxy <TService>?CreateProxy <TService>(string optionsName) where TService : class { var options = _rabbitMQClientOptions.Get(optionsName); if (options.IsPropertiesDefault()) { return(null); } var f = new RabbitMQClientConnectionFactory(new SimpleOptions <RabbitMQClientOptions>(options), _loggerFactory); var clientProxy = new ClientProxy <TService>( f, new SimpleOptions <NClientOption>(_nClientOption.CurrentValue), _clientMiddlewareOptions, _actionExecutingContextAccessor, _serviceProvider, _loggerFactory); return(clientProxy); }
public RabbitMQClientConnectionFactoryOptions(MQOptions options, ILoggerFactory loggerFactory) { Factory = new RabbitMQClientConnectionFactory( new SimpleOptions <RabbitMQClientOptions>(new RabbitMQClientOptions(options)), loggerFactory); }