public (IDisposableBufferedAsyncPublisher <T>, IBufferedAsyncSubscriber <T>) CreateBufferedAsyncEvent <T>(T initialValue) { var innerCore = new AsyncMessageBrokerCore <T>(diagnosticsInfo, options); var core = new BufferedAsyncMessageBrokerCore <T>(innerCore); var broker = new BufferedAsyncMessageBroker <T>(core, asyncHandlerFactory); var publisher = new DisposableBufferedAsyncPublisher <T>(broker, innerCore); var subscriber = broker; publisher.Publish(initialValue, CancellationToken.None); // set initial value is completely sync. return(publisher, subscriber); }
public BufferedAsyncMessageBroker(BufferedAsyncMessageBrokerCore <TMessage> core, FilterAttachedAsyncMessageHandlerFactory handlerFactory) { this.core = core; this.handlerFactory = handlerFactory; }