예제 #1
0
        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);
            }
        }