/// <summary>
        /// Defines a parameterized stream factory identified by the specified URI.
        /// </summary>
        /// <typeparam name="TArgs">Type of the parameter passed to the stream factory.</typeparam>
        /// <typeparam name="TInput">Type of the data received by the subjects created by the stream factory.</typeparam>
        /// <typeparam name="TOutput">Type of the data produced by the subjects created by the stream factory.</typeparam>
        /// <param name="uri">URI identifying the stream factory.</param>
        /// <param name="streamFactory">Stream factory to be defined.</param>
        /// <param name="state">Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it.</param>
        public void DefineStreamFactory <TArgs, TInput, TOutput>(Uri uri, IReactiveQubjectFactory <TInput, TOutput, TArgs> streamFactory, object state = null)
        {
            if (uri == null)
            {
                throw new ArgumentNullException(nameof(uri));
            }
            if (streamFactory == null)
            {
                throw new ArgumentNullException(nameof(streamFactory));
            }

            DefineStreamFactoryCore <TArgs, TInput, TOutput>(uri, streamFactory, state);
        }
 /// <summary>
 /// Defines a parameterized stream factory identified by the specified URI.
 /// </summary>
 /// <typeparam name="TArgs">Type of the parameter passed to the stream factory.</typeparam>
 /// <typeparam name="TInput">Type of the data received by the subjects created by the stream factory.</typeparam>
 /// <typeparam name="TOutput">Type of the data produced by the subjects created by the stream factory.</typeparam>
 /// <param name="uri">URI identifying the stream factory.</param>
 /// <param name="streamFactory">Stream factory to be defined.</param>
 /// <param name="state">Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it.</param>
 protected abstract void DefineStreamFactoryCore <TArgs, TInput, TOutput>(Uri uri, IReactiveQubjectFactory <TInput, TOutput, TArgs> streamFactory, object state = null);
Esempio n. 3
0
 internal IReactiveQubject <TInput, TOutput> CreateStream <TArgs, TInput, TOutput>(IReactiveQubjectFactory <TInput, TOutput, TArgs> factory, TArgs argument, Uri streamUri, object state)
 {
     return(CreateStream <TInput, TOutput>(factory, new Expression[] { Expression.Constant(argument, typeof(TArgs)) }, streamUri, state));
 }
Esempio n. 4
0
 internal IReactiveQubject <TInput, TOutput> CreateStream <TInput, TOutput>(IReactiveQubjectFactory <TInput, TOutput> factory, Uri streamUri, object state)
 {
     return(CreateStream <TInput, TOutput>(factory, Array.Empty <Expression>(), streamUri, state));
 }
Esempio n. 5
0
 public void DefineStreamFactory <TArgs, TInput, TOutput>(Uri uri, IReactiveQubjectFactory <TInput, TOutput, TArgs> streamFactory, object state)
 {
     throw new NotImplementedException();
 }
Esempio n. 6
0
        /// <summary>
        /// Defines a parameterized stream factory identified by the specified URI.
        /// </summary>
        /// <typeparam name="TArgs">Type of the parameter passed to the stream factory.</typeparam>
        /// <typeparam name="TInput">Type of the data received by the subjects created by the stream factory.</typeparam>
        /// <typeparam name="TOutput">Type of the data produced by the subjects created by the stream factory.</typeparam>
        /// <param name="uri">URI identifying the stream factory.</param>
        /// <param name="streamFactory">Stream factory to be defined.</param>
        /// <param name="state">Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it.</param>
        protected override void DefineStreamFactoryCore <TArgs, TInput, TOutput>(Uri uri, IReactiveQubjectFactory <TInput, TOutput, TArgs> streamFactory, object state = null)
        {
            var expression = _expressionServices.Normalize(streamFactory.Expression);

            _provider.DefineStreamFactory(uri, expression, state);
        }
 /// <summary>
 /// Defines a parameterized stream factory identified by the specified URI.
 /// </summary>
 /// <typeparam name="TArgs">Type of the parameter passed to the stream factory.</typeparam>
 /// <typeparam name="TInput">Type of the data received by the subjects created by the stream factory.</typeparam>
 /// <typeparam name="TOutput">Type of the data produced by the subjects created by the stream factory.</typeparam>
 /// <param name="uri">URI identifying the stream factory.</param>
 /// <param name="streamFactory">Stream factory to be defined.</param>
 /// <param name="state">Additional metadata to associate with the artifact. Implementations can interpret this value, or ignore it.</param>
 public void DefineStreamFactory <TArgs, TInput, TOutput>(Uri uri, IReactiveQubjectFactory <TInput, TOutput, TArgs> streamFactory, object state = null) => Definition.DefineStreamFactory(uri, streamFactory, state);