/// <summary> /// Deletes a stream. /// </summary> /// <typeparam name="TInput">Type of the data received by the subject.</typeparam> /// <typeparam name="TOutput">Type of the data produced by the subject.</typeparam> /// <param name="stream">Stream to delete.</param> /// <param name="token">Token to observe for cancellation of the request.</param> /// <returns>Task to await the acknowledgement of the deletion of the stream, or an exception.</returns> protected override Task DeleteStreamAsyncCore <TInput, TOutput>(IAsyncReactiveQubject <TInput, TOutput> stream, CancellationToken token) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } if (!TryGetUriFromKnownResource(stream, out Uri uri)) { throw new InvalidOperationException("Unknown stream object. Could not find a URI identity for the specified stream object. Did you obtain the stream object from CreateAsync or GetStream?"); } return(_provider.DeleteStreamAsync(uri, token)); }
/// <summary> /// Deletes a stream. /// </summary> /// <typeparam name="TInput">Type of the data received by the subject.</typeparam> /// <typeparam name="TOutput">Type of the data produced by the subject.</typeparam> /// <param name="stream">Stream to delete.</param> /// <param name="token">Token to observe for cancellation of the request.</param> /// <returns>Task to await the acknowledgement of the deletion of the stream, or an exception.</returns> protected abstract Task DeleteStreamAsyncCore <TInput, TOutput>(IAsyncReactiveQubject <TInput, TOutput> stream, CancellationToken token);
internal Task DeleteStreamAsync <TInput, TOutput>(IAsyncReactiveQubject <TInput, TOutput> stream, CancellationToken token) => DeleteStreamAsyncCore <TInput, TOutput>(stream, token);