コード例 #1
0
        private async Task ReplyApplicationCommandAsync(IEndSubTransactionDomainNotification notification, CancellationToken token)
        {
            var reply = new SagaTransactionDomainNotification(notification.Message);

            reply.FillFrom(notification);

            await PublishDomainNotificationAsync(reply, token);
        }
コード例 #2
0
        public static bool NeedReplyApplicationCommand(this IDomainNotification notification, out IEndSubTransactionDomainNotification needRepliedNotification)
        {
            if (notification.ApplicationCommandReplyScheme == ApplicationCommandReplySchemes.OnDomainCommandHandled &&
                notification is IEndSubTransactionDomainNotification endNotification)
            {
                needRepliedNotification = endNotification;

                return(true);
            }

            needRepliedNotification = null;
            return(false);
        }