コード例 #1
0
ファイル: EventFactory.cs プロジェクト: dav1977/MessagePipe
        public (IDisposableBufferedPublisher <T>, IBufferedSubscriber <T>) CreateBufferedEvent <T>(T initialValue)
        {
            var innerCore  = new MessageBrokerCore <T>(diagnosticsInfo, options);
            var core       = new BufferedMessageBrokerCore <T>(innerCore);
            var broker     = new BufferedMessageBroker <T>(core, handlerFactory);
            var publisher  = new DisposableBufferedPublisher <T>(broker, innerCore);
            var subscriber = broker;

            publisher.Publish(initialValue);
            return(publisher, subscriber);
        }
コード例 #2
0
ファイル: MessageBroker.cs プロジェクト: dav1977/MessagePipe
 public BufferedMessageBroker(BufferedMessageBrokerCore <TMessage> core, FilterAttachedMessageHandlerFactory handlerFactory)
 {
     this.core           = core;
     this.handlerFactory = handlerFactory;
 }