static IBusActivityMonitor CreateBusActivityMonitorInternal(IBus bus, BusActivityReceiveIndicator receiveIndicator, BusActivityConsumeIndicator consumeIndicator, BusActivitySendIndicator sendIndicator, BusActivityPublishIndicator publishIndicator) { BusActivityMonitor activityMonitor = new BusActivityMonitor(); ConditionExpression conditionExpression = new ConditionExpression(activityMonitor); conditionExpression.AddConditionBlock(receiveIndicator, consumeIndicator, sendIndicator, publishIndicator); bus.ConnectReceiveObserver(receiveIndicator); bus.ConnectConsumeObserver(consumeIndicator); return activityMonitor; }
static IBusActivityMonitor CreateBusActivityMonitorInternal(IBus bus, BusActivityReceiveIndicator receiveIndicator, BusActivityConsumeIndicator consumeIndicator, BusActivitySendIndicator sendIndicator, BusActivityPublishIndicator publishIndicator) { BusActivityMonitor activityMonitor = new BusActivityMonitor(); ConditionExpression conditionExpression = new ConditionExpression(activityMonitor); conditionExpression.AddConditionBlock(receiveIndicator, consumeIndicator, sendIndicator, publishIndicator); bus.ConnectReceiveObserver(receiveIndicator); bus.ConnectConsumeObserver(consumeIndicator); return(activityMonitor); }
public Task PreStart(IBus bus) { foreach (var observer in _receiveObservers) { bus.ConnectReceiveObserver(observer); } foreach (var observer in _consumeObservers) { bus.ConnectConsumeObserver(observer); } return(Task.CompletedTask); }
public ConnectHandle ConnectConsumeObserver(IConsumeObserver observer) { return(_bus.ConnectConsumeObserver(observer)); }