Esempio n. 1
0
        public (IDisposablePublisher <T>, ISubscriber <T>) CreateEvent <T>()
        {
            var core       = new MessageBrokerCore <T>(diagnosticsInfo, options);
            var publisher  = new DisposablePublisher <T>(core);
            var subscriber = new MessageBroker <T>(core, handlerFactory);

            return(publisher, subscriber);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public BufferedMessageBrokerCore(MessageBrokerCore <TMessage> core)
 {
     this.core        = core;
     this.lastMessage = default;
 }
Esempio n. 4
0
 public Subscription(MessageBrokerCore <TMessage> core, int subscriptionKey)
 {
     this.core            = core;
     this.subscriptionKey = subscriptionKey;
 }
Esempio n. 5
0
 public MessageBroker(MessageBrokerCore <TMessage> core, FilterAttachedMessageHandlerFactory handlerFactory)
 {
     this.core           = core;
     this.handlerFactory = handlerFactory;
 }
Esempio n. 6
0
 public HandlerHolder(MessageBrokerCore <TKey, TMessage> core)
 {
     this.handlers = new FreeList <IMessageHandler <TMessage> >();
     this.core     = core;
 }
Esempio n. 7
0
 public DisposablePublisher(MessageBrokerCore <TMessage> core)
 {
     this.core = core;
 }