public InboundMessageInterceptor Create(IInboundMessageInterceptor messageInterceptor) { var scope = new InboundMessageInterceptorConfiguratorScope(); _sink.Inspect(scope); return(ConfigureInterceptor(scope.InsertAfter, messageInterceptor)); }
public static IEnumerable <IPipelineSink <TMessage> > ShouldHaveSubscriptionFor <TMessage>(this IInboundMessagePipeline pipeline) where TMessage : class { DateTime giveUpAt = DateTime.Now + Timeout; while (DateTime.Now < giveUpAt) { var inspector = new PipelineSinkLocator <TMessage>(); pipeline.Inspect(inspector); if (inspector.Result.Count() > 0) { return(inspector.Result); } Thread.Sleep(20); } Assert.Fail("A subscription for " + typeof(TMessage).ToFriendlyName() + " was not found on the pipeline"); return(null); }