public override async Task Handle(SlightlyDifferentTestMessage message, bool resend,
                                   CancellationToken cancellationToken)
 {
     Console.WriteLine(
         $"{GetType().Name} {message.Id} {message.TestValueObject.Id} {message.TestValueObject.SomeDate} {resend}");
     ResultHolder.Add(message.Id, message.TestValueObject.Id);
 }
 protected virtual void ClearDb()
 {
     DropCollection("test_Envelops");
     DropCollection("Subscriber");
     DropCollection("test2_Envelops");
     ResultHolder.Clear();
 }
示例#3
0
 public override async Task Handle(TestMessage message, bool resend, CancellationToken cancellationToken)
 {
     Console.WriteLine($"{GetType().Name} {message.Id} {message.Name}  {resend}");
     if (resend)
     {
         ResultHolder.Add(message.Id + "resend", message.Name);
     }
     else
     {
         throw new InvalidOperationException();
     }
 }
示例#4
0
 public override async Task Handle(TestMessage message, bool resend, CancellationToken cancellationToken)
 {
     Console.WriteLine($"{GetType().Name} {message.Id} {message.Name}  {resend}");
     ResultHolder.Add(message.Id, message.Name);
 }
示例#5
0
        public override async Task Handle(TestMessage message, bool resend, CancellationToken cancellationToken)
        {
            await Task.Delay(3000, cancellationToken);

            ResultHolder.Add(message.Id, DateTime.UtcNow.ToString(CultureInfo.InvariantCulture));
        }
示例#6
0
 public override async Task Handle(TestMessage message, bool resend, CancellationToken cancellationToken)
 {
     ResultHolder.Add(message.Id + "resend" + Guid.NewGuid(), message.Name);
     throw new InvalidOperationException();
 }
 public override async Task Handle(AnotherTestMessage message, bool resend, CancellationToken cancellationToken)
 {
     Console.WriteLine($"{GetType().Name} {message.SomeDate} {message.UselessNumber}  {resend}");
     ResultHolder.Add(message.SomeDate.ToString(), message.UselessNumber.ToString());
 }