コード例 #1
0
ファイル: Client.cs プロジェクト: PRIESt512/WebRabbit-DSR-
 /// <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;
 }
コード例 #4
0
 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;
 }