public static async Task <ValidatingContext <TMessage> > Run <TMessage>(IHandleTimeouts <TMessage> handler, TMessage message)
            where TMessage : class
        {
            Guard.AgainstNull(message, nameof(message));
            Guard.AgainstNull(handler, nameof(handler));
            var context = Build(message);
            await context.Run(handler);

            return(context);
        }
コード例 #2
0
        public async Task Run(IHandleTimeouts <TMessage> handler)
        {
            Guard.AgainstNull(handler, nameof(handler));
            hasRun = true;
            await TestContextValidator.Validate(message, Headers, Extensions, Builder);

            await handler.Timeout(message, this);

            AddDataIfSaga(handler);
        }