public Task PostCreate(IBus bus)
        {
            var observer = _provider.GetService <T>();

            if (observer != null)
            {
                _handle = bus.ConnectReceiveEndpointObserver(observer);
            }

            return(TaskUtil.Completed);
        }
Esempio n. 2
0
        protected virtual void ConnectObservers(IBus bus)
        {
            bus.ConnectReceiveEndpointObserver(new TestReceiveEndpointObserver(_published));

            OnConnectObservers?.Invoke(bus);
        }
Esempio n. 3
0
        Task IBusObserver.PostCreate(IBus bus)
        {
            bus.ConnectReceiveEndpointObserver(this);

            return(TaskUtil.Completed);
        }
 public ConnectHandle ConnectReceiveEndpointObserver(IReceiveEndpointObserver observer)
 {
     return(_bus.ConnectReceiveEndpointObserver(observer));
 }
 public Task PreStart(IBus bus)
 {
     bus.ConnectReceiveEndpointObserver(_observer);
     return(Task.CompletedTask);
 }