コード例 #1
0
        public async Task DeleteStream(
            StreamId streamId,
            int expectedVersion = -2,
            CancellationToken cancellationToken = new CancellationToken())
        {
            var span = _spanSource.Begin("stream-store." + nameof(DeleteStream), ServiceName, streamId, TypeName);

            try
            {
                await _streamStore
                .DeleteStream(
                    streamId,
                    expectedVersion,
                    cancellationToken);
            }
            catch (Exception ex)
            {
                span?.SetError(ex);
                throw;
            }
            finally
            {
                span?.Dispose();
            }
        }
コード例 #2
0
 public async Task DeleteStream(
     StreamId streamId,
     int expectedVersion = -2,
     CancellationToken cancellationToken = new CancellationToken())
 => await Trace(
     nameof(DeleteStream),
     streamId,
     () => _streamStore.DeleteStream(streamId, expectedVersion, cancellationToken));