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, 2560, 1920, filename); //PipelineDebugVisualizer.TestShowVisualizer(input); }
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) { try { var data = (PipelineGraphData)objectProvider.GetObject(); Graph graph = new PipelineGraphGenerator().CreateGraph(data); using (var form = new GraphVisualizerForm(graph, "Pipeline Visualizer")) windowService.ShowDialog(form); } catch (InvalidCastException) { MessageBox.Show("The selected data is not of a type compatible with this visualizer.", GetType().ToString()); } }