/// <summary>
        /// Creates 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 create.</param>
        /// <param name="state">Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it.</param>
        /// <param name="token">Token to observe for cancellation of the request.</param>
        /// <returns>Task to await the acknowledgement of the creation of the stream, or an exception.</returns>
        protected override Task CreateStreamAsyncCore <TInput, TOutput>(IAsyncReactiveQubject <TInput, TOutput> stream, object state, 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.CreateStreamAsync(uri, stream.Expression, state, token));
        }