/// <inheritdoc cref="ILazyMessageStreamEnumerable.GetOrCreateStream" /> public IMessageStreamEnumerable GetOrCreateStream() { if (_stream == null) { _stream = new MessageStreamEnumerable <TMessage>(); _taskCompletionSource.SetResult(_stream); } return(_stream); }
public void Dispose() { _stream?.Dispose(); _stream = null; }