private async Task ReplyApplicationCommandAsync(IEndSubTransactionDomainNotification notification, CancellationToken token) { var reply = new SagaTransactionDomainNotification(notification.Message); reply.FillFrom(notification); await PublishDomainNotificationAsync(reply, token); }
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); }