コード例 #1
0
            public void ImplementsMessageType <T>(bool direct)
                where T : class
            {
                IMessageSendPipeSpecification <T> implementedTypeSpecification = _specification.GetMessageSpecification <T>();

                _messageSpecification.AddImplementedMessageSpecification(implementedTypeSpecification);
            }
コード例 #2
0
        public void MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
            where T : class
        {
            IMessageSendPipeSpecification <T> messageSpecification = _specification.GetMessageSpecification <T>();

            specification.AddParentMessageSpecification(messageSpecification);
        }
コード例 #3
0
        void ISendPipeSpecificationObserver.MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
        {
            var applicationInsightsSendSpecification =
                new ApplicationInsightsSendSpecification <T>(_telemetryClient, _telemetryHeaderRootKey, _telemetryHeaderParentKey, _configureOperation);

            specification.AddPipeSpecification(applicationInsightsSendSpecification);
        }
コード例 #4
0
            public MessagePipe(SendObservable observers, IMessageSendPipeSpecification <TMessage> specification)
            {
                _output = new Lazy <IMessageSendPipe <TMessage> >(CreateFilter);

                _observers     = observers;
                _specification = specification;
            }
コード例 #5
0
        void ISendPipeSpecificationObserver.MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
        {
            var applicationInsightsSendSpecification =
                new DiagnosticsActivityPipeSpecification <T>(_diagnosticSource, _activityIdKey, _activityCorrelationContextKey);

            specification.AddPipeSpecification(applicationInsightsSendSpecification);
        }
コード例 #6
0
        void ISendPipeSpecificationObserver.MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
        {
            IMessageSendTopology <T> messageSendTopology = _topology.GetMessageTopology <T>();

            var topologySpecification = new MessageSendTopologyPipeSpecification <T>(messageSendTopology);

            specification.AddParentMessageSpecification(topologySpecification);
        }
コード例 #7
0
        public void MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
            where T : class
        {
            var scopeProviderType =
                typeof(AutofacFilterContextScopeProvider <,>).MakeGenericType(_filterType.MakeGenericType(typeof(T)), typeof(SendContext <T>));
            var scopeProvider = (IFilterContextScopeProvider <SendContext <T> >)Activator.CreateInstance(scopeProviderType, _lifetimeScopeProvider);
            var filter        = new ScopedFilter <SendContext <T> >(scopeProvider);

            specification.UseFilter(filter);
        }
コード例 #8
0
        public void MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
            where T : class
        {
            All(observer =>
            {
                observer.MessageSpecificationCreated(specification);

                return(true);
            });
        }
コード例 #9
0
        void ISendPipeConfigurator.AddPipeSpecification <T>(IPipeSpecification <SendContext <T> > specification)
        {
            IMessageSendPipeSpecification <T> messageSpecification = GetMessageSpecification <T>();

            messageSpecification.AddPipeSpecification(specification);
        }
コード例 #10
0
 public void MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
     where T : class
 {
     specification.AddScopedFilter <SendContext <T>, T>(_filterType, _provider);
 }
コード例 #11
0
 public void MessageSpecificationCreated <T>(IMessageSendPipeSpecification <T> specification)
     where T : class
 {
     specification.AddPipeSpecification(new ScopeSendPipeSpecification <T>(_sendScopeProvider));
 }
コード例 #12
0
 public void MessageSpecificationCreated <TMessage>(IMessageSendPipeSpecification <TMessage> specification)
     where TMessage : class
 {
     specification.AddPipeSpecification(new MySendMessagePipeSpec <TMessage>());
 }
コード例 #13
0
ファイル: SendPipe.cs プロジェクト: youqingz/MassTransit
            public MessagePipe(IMessageSendPipeSpecification <TMessage> specification)
            {
                _specification = specification;

                _output = new Lazy <IMessageSendPipe <TMessage> >(CreateFilter);
            }