Beispiel #1
0
        /// <summary>
        /// Registers an IStreamable object as an output of a query, with output as a progressively changing enumerable.
        /// </summary>
        /// <typeparam name="TPayload">The type of the payload of the data source.</typeparam>
        /// <param name="container">A query container to which this egress point can be attached.</param>
        /// <param name="stream">An IStreamable object that is intended to be an output to the query.</param>
        /// <param name="identifier">A string that can uniquely identify the point of egress in the query.</param>
        /// <returns>An IObservable object of change list events for output data from the query.</returns>
        public static EvolvingStateEnumerable <TPayload> RegisterOutputAsEnumerable <TPayload>(this QueryContainer container, IStreamable <Empty, TPayload> stream, string identifier = null)
        {
            Invariant.IsNotNull(stream, nameof(stream));

            return(stream.ToEnumerable(container, identifier ?? Guid.NewGuid().ToString()));
        }