/// <summary> /// Category Stream Listener /// i.e. $ce-[AggregateType] /// </summary> /// <typeparam name="TAggregate">The Aggregate type used to generate the stream name</typeparam> /// <param name="checkpoint"></param> /// <param name="blockUntilLive"></param> /// <param name="cancelWaitToken">Cancellation token to cancel waiting if blockUntilLive is true</param> public void Start <TAggregate>( long?checkpoint = null, bool blockUntilLive = false, CancellationToken cancelWaitToken = default(CancellationToken)) where TAggregate : class, IEventSource { Start( _streamNameBuilder.GenerateForCategory(typeof(TAggregate)), checkpoint, blockUntilLive, cancelWaitToken); }
/// <summary> /// Category Stream Listener /// i.e. $ce-[AggregateType] /// </summary> /// <typeparam name="TAggregate">The Aggregate type used to generate the stream name</typeparam> /// <param name="checkpoint"></param> /// <param name="blockUntilLive"></param> /// <param name="timeout">timeout in milliseconds default = 1000</param> public void Start <TAggregate>( long?checkpoint = null, bool blockUntilLive = false, int timeout = 1000) where TAggregate : class, IEventSource { Start( _streamNameBuilder.GenerateForCategory(typeof(TAggregate)), checkpoint, blockUntilLive, timeout); }
/// <summary> /// By Category Projection Stream Reader /// i.e. $ce-[AggregateType] /// </summary> /// <typeparam name="TAggregate">The Aggregate type used to generate the stream name</typeparam> /// <param name="checkpoint">The starting point to read from.</param> /// <param name="count">The count of items to read</param> /// <param name="readBackwards">Read the stream backwards</param> /// <returns>Returns true if any events were read from the stream</returns> public bool Read <TAggregate>( long?checkpoint = null, long?count = null, bool readBackwards = false) where TAggregate : class, IEventSource { return(Read( _streamNameBuilder.GenerateForCategory(typeof(TAggregate)), checkpoint, count, readBackwards)); }