public SimulatedProxyClient( IAsyncCoupler <IMessage> asyncCoupler, ILogger logger, QueueSimulator queue) : base(asyncCoupler, logger) { _queue = queue ?? throw new ArgumentNullException(nameof(queue)); }
public SimulatedTransceiver( IAsyncCoupler <IMessage> asyncCoupler, ILogger logger, object result) : base(asyncCoupler, logger) { _result = result; }
public ProxyFactory( ITransceiverConnectionSettings connectionSettings, ITransceiver client, IAsyncCoupler <IMessage> asyncCoupler, ILogger logger) { _connectionSettings = connectionSettings ?? throw new ArgumentNullException(nameof(connectionSettings)); _client = client ?? throw new ArgumentNullException(nameof(client)); _asyncCoupler = asyncCoupler ?? throw new ArgumentNullException(nameof(asyncCoupler)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
internal static TProxyInterface Create <TProxyInterface>( ITransceiverConnectionSettings connectionSettings, ITransceiver client, IAsyncCoupler <IMessage> asyncCoupler, ILogger logger, IProxySettings proxySettings) where TProxyInterface : class { var result = Create <TProxyInterface, Proxy>(); var proxy = (result as Proxy); proxy._connectionSettings = connectionSettings ?? throw new ArgumentNullException(nameof(connectionSettings)); proxy._client = client ?? throw new ArgumentNullException(nameof(client)); proxy._asyncCoupler = asyncCoupler ?? throw new ArgumentNullException(nameof(asyncCoupler)); proxy._logger = logger ?? throw new ArgumentNullException(nameof(logger)); proxy._proxySettings = proxySettings ?? throw new ArgumentNullException(nameof(proxySettings)); if (string.IsNullOrEmpty(proxySettings.OrganizationId)) { throw new ArgumentNullException(nameof(proxySettings.OrganizationId)); } if (string.IsNullOrEmpty(proxySettings.InstanceId)) { throw new ArgumentNullException(nameof(proxySettings.InstanceId)); } if (string.IsNullOrEmpty(connectionSettings.RpcClientReceiver.ResourceName)) { throw new ArgumentNullException(nameof(connectionSettings.RpcClientReceiver.ResourceName)); } proxy._replyPath = connectionSettings.RpcClientReceiver.ResourceName; if (connectionSettings.RpcClientTransmitter.TimeoutInSeconds == 0) { throw new ArgumentException("timeout must be greater than zero", nameof(connectionSettings.RpcClientReceiver.TimeoutInSeconds)); } proxy._requestTimeout = TimeSpan.FromSeconds(connectionSettings.RpcClientTransmitter.TimeoutInSeconds); return(result); }
public ServiceBusProxyClient( IAsyncCoupler <IMessage> asyncCoupler, ILogger logger) : base(asyncCoupler, logger) { }
public AbstractProxyClient(IAsyncCoupler <IMessage> asyncCoupler, ILogger logger) : base() { _asyncCoupler = asyncCoupler ?? throw new ArgumentNullException(nameof(asyncCoupler)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }