public void Setup() { Input = PipeSegment.Input(PipeSegment.End()); Scope = Input.NewSubscriptionScope(); EstablishContext(); }
public void Should_display_an_InputSegment() { var end = PipeSegment.End <object>(); Pipe input = PipeSegment.Input(end); new TracePipeVisitor().Trace(input); }
public void Should_display_a_FilterSegment() { var end = PipeSegment.End <ClaimModified>(); Pipe filter = PipeSegment.Filter <object>(end); new TracePipeVisitor().Trace(filter); }
public void Should_display_a_RecipientListSegment_with_one_child_segment() { var end = PipeSegment.End <ClaimModified>(); Pipe recipientList = PipeSegment.RecipientList <ClaimModified>(new Pipe[] { end }); new TracePipeVisitor().Trace(recipientList); }
public void Setup() { _addCalled = new Future <bool>(); _removeCalled = new Future <bool>(); _input = PipeSegment.Input(PipeSegment.End()); _subscriberScope = _input.NewSubscriptionScope(); _subscriberScope.Subscribe <SubscriberAdded>(x => { if (x.MessageType == typeof(ClaimModified)) { _addCalled.Complete(true); } }); _subscriberScope.Subscribe <SubscriberRemoved>(x => { if (x.MessageType == typeof(ClaimModified)) { _removeCalled.Complete(true); } }); using (ISubscriptionScope scope = _input.NewSubscriptionScope()) { scope.Subscribe <ClaimModified>(x => { }); } }
private void RegisterApplicationServices(IContainer container) { var pipe = PipeSegment.Input(PipeSegment.End()); container.RegisterAsSingleton((Pipe)pipe); container.RegisterAsSingleton <IEventsProvider, EventsProvider>(); }
public void Setup() { Input = PipeSegment.Input(PipeSegment.End <object>()); BeforeCalled = new ManualResetEvent(false); AfterCalled = new ManualResetEvent(false); EstablishContext(); }
public void Second_example() { _eventAggregator = PipeSegment.Input(PipeSegment.End()); _scope = _eventAggregator.NewSubscriptionScope(); _scope.Subscribe <CustomerChanged>(message => Trace.WriteLine("Customer changed: " + message.CustomerName)); new TracePipeVisitor().Trace(_eventAggregator); }
public void Setup() { _pipe = PipeSegment.Input(PipeSegment.End <object>()); _subscriptionScope = _pipe.NewSubscriptionScope(); _called = new ManualResetEvent(false); _subscriptionScope.Subscribe <ClaimModified>(x => _called.Set()); EstablishContext(); }
public void Should_display_a_complex_segment_chain() { var consumer = PipeSegment.Consumer <ClaimModified>(x => { }); var end = PipeSegment.End <ClaimModified>(); var recipientList = PipeSegment.RecipientList <ClaimModified>(new Pipe[] { consumer, end }); var filter = PipeSegment.Filter <object>(recipientList); Pipe input = PipeSegment.Input(filter); new TracePipeVisitor().Trace(input); }
public void Should_contain_all_nodes() { MessageConsumerSegment consumer = PipeSegment.Consumer <SomethingHappenedEvent>(x => { }); EndSegment end = PipeSegment.End <SomethingHappenedEvent>(); RecipientListSegment recipientList = PipeSegment.RecipientList <SomethingHappenedEvent>(new Pipe[] { consumer, end }); FilterSegment filter = PipeSegment.Filter <object>(recipientList); Pipe input = PipeSegment.Input(filter); //var generator = new PipelineGraphGenerator(); //string filename = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "graph.png"); //generator.SaveGraphToFile(input.GetGraphData(), 2560, 1920, filename); PipelineDebugVisualizer.TestShowVisualizer(input.GetGraphData()); }
public EventsProvider() { _eventsPipe = PipeSegment.Input(PipeSegment.End());; _scope = _eventsPipe.NewSubscriptionScope(); }
public AppFrameRegistry() { ForRequestedType <Pipe>() .CacheBy(InstanceScope.Singleton) .TheDefault.Is.ConstructedBy(x => PipeSegment.Input(PipeSegment.End())); }
public static Pipe New(this Pipe ignored) { return(PipeSegment.Input(PipeSegment.End())); }
public void Setup() { _pipe = PipeSegment.Input(PipeSegment.End <ClaimModified>()); _scope = _pipe.NewSubscriptionScope(); _scope.Subscribe <ClaimModified>(x => { }); }
public void Should_display_an_EndSegment() { Pipe end = PipeSegment.End <object>(); new TracePipeVisitor().Trace(end); }
static MagnumMessenger() { myMessageBus = PipeSegment.Input(PipeSegment.End()); mySubscriptionScope = myMessageBus.NewSubscriptionScope(); }
public MagnumMessenger() { _messageBus = PipeSegment.Input(PipeSegment.End()); _subscriptionScope = _messageBus.NewSubscriptionScope(); }
public void First_example() { _eventAggregator = PipeSegment.Input(PipeSegment.End()); _eventAggregator.Send(new CustomerRatingDowngraded()); }
public void Setup() { _received = new ManualResetEvent(false); _pipe = PipeSegment.Input(PipeSegment.End()); }