public MessageInterceptor Create(Action beforeConsume, Action afterConsume) { var scope = new MessageInterceptorConfiguratorScope(); _sink.Inspect(scope); return(ConfigureFilter(scope.InsertAfter, beforeConsume, afterConsume)); }
public OutboundMessageInterceptor Create(IOutboundMessageInterceptor messageInterceptor) { var scope = new OutboundMessageInterceptorConfiguratorScope(); _sink.Inspect(scope); return(ConfigureInterceptor(scope.InsertAfter, messageInterceptor)); }
public MessageRouter <IConsumeContext <TOutput> > FindOrCreate <TOutput>() where TOutput : class { var scope = new InboundMessageRouterConfiguratorScope <IConsumeContext <TOutput> >(); _sink.Inspect(scope); return(scope.OutputRouter ?? ConfigureRouter <TOutput>(scope.InputRouter)); }
public static void Trace <T>(IPipelineSink <T> pipeline, Action <string> callback) where T : class { var viewer = new PipelineViewer(); pipeline.Inspect(viewer); callback(viewer.Text); }
public static void Trace <T>(IPipelineSink <T> pipeline) where T : class { var viewer = new PipelineViewer(); pipeline.Inspect(viewer); System.Diagnostics.Trace.WriteLine(viewer.Text); }
public MessageFilter <TMessage> Create <TMessage>(string description, Func <TMessage, bool> allow) where TMessage : class { EnsureRouterExists <TMessage>(_sink); var scope = new MessageFilterConfiguratorScope <TMessage>(); _sink.Inspect(scope); return(ConfigureFilter(description, scope.InsertAfter, allow)); }
public RequestMessageRouter <IConsumeContext <TMessage>, TMessage> FindOrCreate <TMessage>() where TMessage : class { var configurator = new InboundMessageRouterConfigurator(_sink); MessageRouter <IConsumeContext <TMessage> > router = configurator.FindOrCreate <TMessage>(); var scope = new InboundRequestMessageRouterConfiguratorScope <TMessage>(); _sink.Inspect(scope); return(scope.Router ?? ConfigureRouter(router)); }
public CorrelatedMessageRouter <IConsumeContext <TMessage>, TMessage, TKey> FindOrCreate <TMessage, TKey>() where TMessage : class, CorrelatedBy <TKey> { var configurator = new InboundMessageRouterConfigurator(_sink); MessageRouter <IConsumeContext <TMessage> > router = configurator.FindOrCreate <TMessage>(); var scope = new InboundCorrelatedMessageRouterConfiguratorScope <TMessage, TKey>(); _sink.Inspect(scope); return(scope.Router ?? ConfigureRouter <TMessage, TKey>(router)); }
public MessageRouter <TMessage> FindOrCreate <TMessage>() where TMessage : class { var scope = new MessageRouterConfiguratorScope <TMessage>(); if (_sink != null) { _sink.Inspect(scope); } else if (_typedSink != null) { _typedSink.TranslateTo <IPipelineSink <TMessage> >().Inspect(scope); } return(scope.Router ?? ConfigureRouter <TMessage>(scope.ObjectRouter)); }
public bool Inspect(IPipelineInspector inspector) { return(inspector.Inspect(this) && _output.Inspect(inspector)); }
public bool Inspect(IPipelineInspector inspector) { return(inspector.Inspect(this, () => _sink.Inspect(inspector))); }