public AsyncMessageBrokerCore(MessagePipeDiagnosticsInfo diagnotics, MessagePipeOptions options) { this.handlers = new FreeList <IAsyncMessageHandler <TMessage> >(); this.defaultAsyncPublishStrategy = options.DefaultAsyncPublishStrategy; this.handlingSubscribeDisposedPolicy = options.HandlingSubscribeDisposedPolicy; this.diagnotics = diagnotics; }
public MessageBrokerCore(MessagePipeDiagnosticsInfo diagnotics, MessagePipeOptions options) { this.handlerGroup = new Dictionary <TKey, HandlerHolder>(); this.diagnotics = diagnotics; this.handlingSubscribeDisposedPolicy = options.HandlingSubscribeDisposedPolicy; this.gate = new object(); }
async void RunTimer(MessagePipeDiagnosticsInfo diagnosticsInfo) { while (!cts.IsCancellationRequested) { // show SubscribeCount Console.WriteLine(diagnosticsInfo.SubscribeCount); await Task.Delay(TimeSpan.FromSeconds(5), cts.Token); } }
public EventFactory( MessagePipeOptions options, MessagePipeDiagnosticsInfo diagnosticsInfo, FilterAttachedMessageHandlerFactory handlerFactory, FilterAttachedAsyncMessageHandlerFactory asyncHandlerFactory) { this.options = options; this.diagnosticsInfo = diagnosticsInfo; this.handlerFactory = handlerFactory; this.asyncHandlerFactory = asyncHandlerFactory; }
public Program( IPublisher <string, MyMessage> publisher, ISubscriber <string, MyMessage> subscriber, IPublisher <MyMessage> keyless1, ISubscriber <MyMessage> keyless2, IAsyncPublisher <MyMessage> asyncKeylessP, IAsyncSubscriber <MyMessage> asyncKeylessS, IRequestHandler <Ping, Pong> pingponghandler, //PingHandler pingpingHandler, IRequestAllHandler <Ping, Pong> pingallhandler, IPublisher <int> intP, ISubscriber <int> intS, IServiceScopeFactory scopeF, MessagePipeDiagnosticsInfo diagnosticsInfo, IServiceProvider provider ) { this.provider = provider; this.scopeF = scopeF; this.publisher = publisher; this.subscriber = subscriber; this.keylessP = keyless1; this.keylessS = keyless2; this.asyncKeylessP = asyncKeylessP; this.asyncKeylessS = asyncKeylessS; this.pingponghandler = pingponghandler; //this.pingpingHandler = pingpingHandler; this.pingallhandler = pingallhandler; this.intPublisher = intP; this.intSubscriber = intS; this.diagnosticsInfo = diagnosticsInfo; var r1 = provider.GetRequiredService <IRequestHandler <string, int> >(); r1.Invoke("foo"); }
public MessageBrokerCore(MessagePipeDiagnosticsInfo diagnotics, MessagePipeOptions options) { this.handlers = new FreeList <IMessageHandler <TMessage> >(); this.handlingSubscribeDisposedPolicy = options.HandlingSubscribeDisposedPolicy; this.diagnotics = diagnotics; }
public ScopedAsyncMessageBrokerCore(MessagePipeDiagnosticsInfo diagnotics, MessagePipeOptions options) : base(diagnotics, options) { }
public MonitorTimer(MessagePipeDiagnosticsInfo diagnosticsInfo) { RunTimer(diagnosticsInfo); }
public SingletonMessageBrokerCore(MessagePipeDiagnosticsInfo diagnotics, MessagePipeOptions options) : base(diagnotics, options) { }
public static void SetProvider(IServiceProvider provider) { GlobalMessagePipe.provider = provider; GlobalMessagePipe.eventFactory = provider.GetRequiredService <EventFactory>(); GlobalMessagePipe.diagnosticsInfo = provider.GetRequiredService <MessagePipeDiagnosticsInfo>(); }