Exemplo n.º 1
0
        public ConnectHandle ConnectPublishMessageObserver <T>(IPublishMessageObserver <T> observer)
            where T : class
        {
            if (observer == null)
            {
                throw new ArgumentNullException(nameof(observer));
            }

            IPublishMessageObserverConnector messagePipe = GetPipe <T, IPublishMessageObserverConnector>();

            return(messagePipe.ConnectPublishMessageObserver(observer));
        }
Exemplo n.º 2
0
        public ConnectHandle ConnectPublishMessageObserver <T>(IPublishMessageObserver <T> observer)
            where T : class
        {
            var self = _messageObservers as PublishMessageObservable <T>;

            if (self == null)
            {
                throw new InvalidOperationException("The connection type is invalid: " + TypeMetadataCache <T> .ShortName);
            }

            return(self.Connect(observer));
        }
Exemplo n.º 3
0
 ConnectHandle IPublishMessageObserverConnector.ConnectPublishMessageObserver <TMessage>(IPublishMessageObserver <TMessage> observer)
 {
     return(_filter.ConnectPublishMessageObserver(observer));
 }
Exemplo n.º 4
0
 public ConnectHandle ConnectPublishMessageObserver(IPublishMessageObserver <TMessage> observer)
 {
     return(_observers.Connect(observer));
 }
Exemplo n.º 5
0
 ConnectHandle IPublishMessageObserverConnector.ConnectPublishMessageObserver <T>(IPublishMessageObserver <T> observer)
 {
     return(GetPipe <T, IPublishMessageObserverConnector>().ConnectPublishMessageObserver(observer));
 }
Exemplo n.º 6
0
            ConnectHandle IPublishMessageObserverConnector.ConnectPublishMessageObserver <T>(IPublishMessageObserver <T> observer)
            {
                var connector = _output.Value as IMessagePublishPipe <T>;

                if (connector == null)
                {
                    throw new ArgumentException($"The filter is not of the specified type: {typeof(T).Name}", nameof(observer));
                }

                return(connector.ConnectPublishMessageObserver(observer));
            }