/// <summary> /// Определение результатов запроса команды /// </summary> /// <param name="command"></param> /// <returns></returns> private Task CompleteResult(IReceiveCommand command) { _result = new TaskCompletionSource<Command>(); Task.Factory.StartNew(() => { command.GetCommand(_connectionTimeoutSeconds, out _command); if (!_command.IsCompleted) _result.SetCanceled(); else { _result.SetResult(_command); command.CleanCommand(); } }, TaskCreationOptions.LongRunning); return _result.Task; }
public ControlThread(string target, IReceiveCommand command) { this.target = target; this.controlCommand = command; this.thread = new Thread(Run); }
public PrometheusCommandMetricsBehavior(IMetricsService metrics, IReceiveCommand next) { _metrics = metrics; _next = next; }
public HttpCommandReceiver(ILogger log, IReceiveCommand commandReceiver) { _log = log; _commandReceiver = commandReceiver; }
public CommandReceiverCorrelationEnricherBehavior(IOptions <CorrelationLogOptions> options, CorrelationContext.Correlation correlation, IReceiveCommand next) : base(options, correlation) { _next = next; }
public LoopbackCommandReceiver(IReceiveCommand receiver) { _receiver = receiver; }
public RabbitCommandReceiver(IReceiveCommand commandReceiver) { _commandReceiver = commandReceiver; }