public InMemoryOutboxConsumeContext(ConsumeContext context) : base(context) { _context = context; ReceiveContext = new InMemoryOutboxReceiveContext(this, context.ReceiveContext); _pendingActions = new List <Func <Task> >(); _clearToSend = new TaskCompletionSource <InMemoryOutboxConsumeContext>(); }
public InMemoryOutboxConsumeContext(ConsumeContext context) : base(context) { ReceiveContext = new InMemoryOutboxReceiveContext(this, context.ReceiveContext); _pendingActions = new List <Func <Task> >(); _clearToSend = TaskUtil.GetTask <InMemoryOutboxConsumeContext>(); if (context.TryGetPayload(out MessageSchedulerContext schedulerContext)) { _outboxSchedulerContext = new InMemoryOutboxMessageSchedulerContext(schedulerContext); context.AddOrUpdatePayload(() => _outboxSchedulerContext, _ => _outboxSchedulerContext); } }