public MessageFlowViewModel(
            IServiceControl serviceControl,
            IEventAggregator eventAggregator,
            IWindowManagerEx windowManager,
            SearchBarViewModel searchBar,
            MessageListViewModel messageList,
            Func <ExceptionDetailViewModel> exceptionDetail,
            ISettingsProvider settingsProvider,
            EndpointExplorerViewModel endpointExplorer,
            IClipboard clipboard)
        {
            this.serviceControl   = serviceControl;
            this.eventAggregator  = eventAggregator;
            this.windowManager    = windowManager;
            this.settingsProvider = settingsProvider;
            this.messageList      = messageList;
            this.endpointExplorer = endpointExplorer;
            this.exceptionDetail  = exceptionDetail;

            CopyConversationIDCommand = new CopyConversationIDCommand(clipboard);
            CopyMessageURICommand     = new CopyMessageURICommand(clipboard, serviceControl);
            SearchByMessageIDCommand  = new SearchByMessageIDCommand(eventAggregator, searchBar);
            RetryMessageCommand       = new RetryMessageCommand(eventAggregator, serviceControl);

            Diagram = new MessageFlowDiagram();
            nodeMap = new ConcurrentDictionary <string, MessageNode>();
        }
        public SequenceDiagramViewModel(
            IServiceControl serviceControl,
            ISettingsProvider settingsProvider,
            MessageSelectionContext selectionContext,
            DiagramLegendViewModel diagramLegend,
            CopyConversationIDCommand copyConversationIDCommand,
            CopyMessageURICommand copyMessageURICommand,
            RetryMessageCommand retryMessageCommand,
            SearchByMessageIDCommand searchByMessageIDCommand,
            ChangeSelectedMessageCommand changeSelectedMessageCommand,
            ShowExceptionCommand showExceptionCommand,
            ReportMessageCommand reportMessageCommand)
        {
            this.serviceControl   = serviceControl;
            this.settingsProvider = settingsProvider;

            Selection = selectionContext;
            CopyConversationIDCommand    = copyConversationIDCommand;
            CopyMessageURICommand        = copyMessageURICommand;
            RetryMessageCommand          = retryMessageCommand;
            SearchByMessageIDCommand     = searchByMessageIDCommand;
            ChangeSelectedMessageCommand = changeSelectedMessageCommand;
            ShowExceptionCommand         = showExceptionCommand;
            ReportMessageCommand         = reportMessageCommand;
            OpenLink      = Command.Create(arg => new NetworkOperations().Browse(SequenceDiagramDocumentationUrl));
            DiagramLegend = diagramLegend;
            DiagramItems  = new DiagramItemCollection();
            HeaderItems   = new DiagramItemCollection();

            settings = settingsProvider.GetSettings <SequenceDiagramSettings>();

            ShowLegend = settings.ShowLegend;
        }
        public SequenceDiagramViewModel(
            IClipboard clipboard,
            IEventAggregator eventAggregator,
            IWindowManagerEx windowManager,
            IServiceControl serviceControl,
            Func <ExceptionDetailViewModel> exceptionDetailViewModel,
            SearchBarViewModel searchBar,
            EndpointExplorerViewModel endpointExplorer,
            MessageListViewModel messageList)
        {
            this.windowManager            = windowManager;
            this.eventAggregator          = eventAggregator;
            this.serviceControl           = serviceControl;
            this.exceptionDetailViewModel = exceptionDetailViewModel;

            CopyConversationIDCommand = new CopyConversationIDCommand(clipboard);
            CopyMessageURICommand     = new CopyMessageURICommand(clipboard, serviceControl);
            RetryMessageCommand       = new RetryMessageCommand(eventAggregator, serviceControl);
            SearchByMessageIDCommand  = new SearchByMessageIDCommand(eventAggregator, searchBar);
            ShowSagaCommand           = new ShowSagaCommand(eventAggregator, endpointExplorer, messageList);
        }