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(); }
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(); } }
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); }
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)); }
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()); }