/// <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> protected override void CreateStreamCore <TInput, TOutput>(IReactiveQubject <TInput, TOutput> stream, object state) { Debug.Assert(stream != null); var known = TryGetUriFromKnownResource(stream, out Uri uri); Debug.Assert(known); _provider.CreateStream(uri, stream.Expression, state); }
/// <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> protected override void DeleteStreamCore <TInput, TOutput>(IReactiveQubject <TInput, TOutput> stream) { Debug.Assert(stream != null); 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 Create or GetStream?"); } _provider.DeleteStream(uri); }
/// <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> protected abstract void DeleteStreamCore <TInput, TOutput>(IReactiveQubject <TInput, TOutput> stream);
internal void DeleteStream <TInput, TOutput>(IReactiveQubject <TInput, TOutput> stream) => DeleteStreamCore <TInput, TOutput>(stream);
/// <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> protected abstract void CreateStreamCore <TInput, TOutput>(IReactiveQubject <TInput, TOutput> stream, object state);