예제 #1
0
 /// <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;
 }
예제 #2
0
 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;
 }
예제 #6
0
 public LoopbackCommandReceiver(IReceiveCommand receiver)
 {
     _receiver = receiver;
 }
예제 #7
0
 public RabbitCommandReceiver(IReceiveCommand commandReceiver)
 {
     _commandReceiver = commandReceiver;
 }