public async Task <Unit> Invoke(IStreamStore streamStore, CancellationToken ct)
        {
            var messageId = (await streamStore.ReadStreamBackwards(
                                 StreamId,
                                 StreamVersion,
                                 1,
                                 true,
                                 ct))
                            .Messages.FirstOrDefault(
                message => StreamVersion == SqlStreamStore.Streams.StreamVersion.End ||
                message.StreamVersion == StreamVersion)
                            .MessageId;
            await streamStore.DeleteMessage(StreamId, messageId, ct);

            return(Unit.Instance);
        }
Esempio n. 2
0
        public async Task <Unit> Invoke(IStreamStore streamStore, CancellationToken ct)
        {
            await streamStore.DeleteMessage(StreamId, MessageId, ct);

            return(Unit.Instance);
        }