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 void TestInitialize() { windowManager = Substitute.For <WindowManagerEx>(); endpointExplorer = Substitute.For <EndpointExplorerViewModel>(); messageList = Substitute.For <MessageListViewModel>(); licenseStatusBar = Substitute.For <LicenseStatusBar>(); statusbarManager = new StatusBarManager(licenseStatusBar); eventAggregator = Substitute.For <IEventAggregator>(); workNotifier = Substitute.For <IWorkNotifier>(); messageFlow = Substitute.For <MessageFlowViewModel>(); sagaWindow = Substitute.For <SagaWindowViewModel>(); messageBodyView = Substitute.For <MessageBodyViewModel>(); messageProperties = Substitute.For <MessagePropertiesViewModel>(); view = Substitute.For <IShellViewStub>(); headerView = Substitute.For <MessageHeadersViewModel>(); sequenceDiagramView = Substitute.For <SequenceDiagramViewModel>(); settingsProvider = Substitute.For <ISettingsProvider>(); licenseManager = Substitute.For <AppLicenseManager>(); logWindow = Substitute.For <LogWindowViewModel>(); settingsProvider.GetSettings <ProfilerSettings>().Returns(DefaultAppSetting()); app = Substitute.For <IAppCommands>(); commandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( app, windowManager, endpointExplorer, messageList, () => Substitute.For <ServiceControlConnectionViewModel>(), () => Substitute.For <LicenseMessageBoxViewModel>(), statusbarManager, eventAggregator, workNotifier, licenseManager, messageFlow, sagaWindow, messageBodyView, headerView, sequenceDiagramView, settingsProvider, messageProperties, logWindow, commandLineArgParser); ((IViewAware)shell).AttachView(view); }
public void TestInitialize() { windowManager = Substitute.For<WindowManagerEx>(); endpointExplorer = Substitute.For<EndpointExplorerViewModel>(); messageList = Substitute.For<MessageListViewModel>(); statusbarManager = Substitute.For<StatusBarManager>(); eventAggregator = Substitute.For<IEventAggregator>(); workNotifier = Substitute.For<IWorkNotifier>(); messageFlow = Substitute.For<MessageFlowViewModel>(); sagaWindow = Substitute.For<SagaWindowViewModel>(); messageBodyView = Substitute.For<MessageBodyViewModel>(); messageProperties = Substitute.For<MessagePropertiesViewModel>(); view = Substitute.For<IShellViewStub>(); headerView = Substitute.For<MessageHeadersViewModel>(); sequenceDiagramView = Substitute.For<SequenceDiagramViewModel>(); settingsProvider = Substitute.For<ISettingsProvider>(); licenseManager = Substitute.For<AppLicenseManager>(); logWindow = Substitute.For<LogWindowViewModel>(); settingsProvider.GetSettings<ProfilerSettings>().Returns(DefaultAppSetting()); app = Substitute.For<IAppCommands>(); commandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( app, windowManager, endpointExplorer, messageList, () => Substitute.For<ServiceControlConnectionViewModel>(), () => Substitute.For<LicenseRegistrationViewModel>(), statusbarManager, eventAggregator, workNotifier, licenseManager, messageFlow, sagaWindow, messageBodyView, headerView, sequenceDiagramView, settingsProvider, messageProperties, logWindow, commandLineArgParser); ((IViewAware)shell).AttachView(view); }
public void TestInitialize() { WindowManager = Substitute.For <WindowManagerEx>(); EndpointExplorer = Substitute.For <EndpointExplorerViewModel>(); MessageList = Substitute.For <MessageListViewModel>(); StatusbarManager = Substitute.For <StatusBarManager>(); EventAggregator = Substitute.For <IEventAggregator>(); MessageFlow = Substitute.For <MessageFlowViewModel>(); SagaWindow = Substitute.For <SagaWindowViewModel>(); MessageBodyView = Substitute.For <MessageBodyViewModel>(); MessageProperties = Substitute.For <MessagePropertiesViewModel>(); View = Substitute.For <IShellViewStub>(); HeaderView = Substitute.For <MessageHeadersViewModel>(); SequenceDiagramView = Substitute.For <SequenceDiagramViewModel>(); SettingsProvider = Substitute.For <ISettingsProvider>(); LicenseManager = Substitute.For <AppLicenseManager>(); LogWindow = Substitute.For <LogWindowViewModel>(); SettingsProvider.GetSettings <ProfilerSettings>().Returns(DefaultAppSetting()); App = Substitute.For <IAppCommands>(); CommandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( App, WindowManager, EndpointExplorer, MessageList, () => Substitute.For <ServiceControlConnectionViewModel>(), () => Substitute.For <LicenseRegistrationViewModel>(), StatusbarManager, EventAggregator, LicenseManager, MessageFlow, SagaWindow, MessageBodyView, HeaderView, SequenceDiagramView, SettingsProvider, MessageProperties, LogWindow, CommandLineArgParser); ((IViewAware)shell).AttachView(View); }
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); }
public ShellViewModel( IAppCommands appCommander, IWindowManagerEx windowManager, EndpointExplorerViewModel endpointExplorer, MessageListViewModel messages, Func <ServiceControlConnectionViewModel> serviceControlConnection, Func <LicenseRegistrationViewModel> licenceRegistration, StatusBarManager statusBarManager, IEventAggregator eventAggregator, AppLicenseManager licenseManager, MessageFlowViewModel messageFlow, SagaWindowViewModel sagaWindow, MessageBodyViewModel messageBodyViewer, MessageHeadersViewModel messageHeadersViewer, SequenceDiagramViewModel sequenceDiagramViewer, ISettingsProvider settingsProvider, MessagePropertiesViewModel messageProperties, LogWindowViewModel logWindow, CommandLineArgParser comandLineArgParser) { this.appCommander = appCommander; this.windowManager = windowManager; this.eventAggregator = eventAggregator; this.licenseManager = licenseManager; this.settingsProvider = settingsProvider; this.comandLineArgParser = comandLineArgParser; this.serviceControlConnection = serviceControlConnection; this.licenceRegistration = licenceRegistration; MessageProperties = messageProperties; MessageFlow = messageFlow; SagaWindow = sagaWindow; StatusBarManager = statusBarManager; EndpointExplorer = endpointExplorer; MessageHeaders = messageHeadersViewer; MessageBody = messageBodyViewer; SequenceDiagram = sequenceDiagramViewer; Messages = messages; LogWindow = logWindow; Items.Add(endpointExplorer); Items.Add(messages); Items.Add(messageHeadersViewer); Items.Add(messageBodyViewer); Items.Add(messageFlow); InitializeAutoRefreshTimer(); InitializeIdleTimer(); ShutDownCommand = this.CreateCommand(() => this.appCommander.ShutdownImmediately()); AboutCommand = this.CreateCommand(() => this.windowManager.ShowDialog <AboutViewModel>()); HelpCommand = this.CreateCommand(() => Process.Start(@"http://docs.particular.net/")); ConnectToServiceControlCommand = this.CreateCommand(ConnectToServiceControl, vm => vm.CanConnectToServiceControl); RefreshAllCommand = this.CreateCommand(RefreshAll); RegisterCommand = this.CreateCommand(() => { this.windowManager.ShowDialog <LicenseRegistrationViewModel>(); DisplayRegistrationStatus(); }); ResetLayoutCommand = this.CreateCommand(() => View.OnResetLayout(settingsProvider)); OptionsCommand = this.CreateCommand(() => windowManager.ShowDialog <OptionsViewModel>()); }
public ShowSagaCommand(IEventAggregator eventAggregator, EndpointExplorerViewModel endpointExplorer, MessageListViewModel messageList) { this.messageList = messageList; this.endpointExplorer = endpointExplorer; this.eventAggregator = eventAggregator; }
public void TestInitialize() { WindowManager = Substitute.For<WindowManagerEx>(); EndpointExplorer = Substitute.For<EndpointExplorerViewModel>(); MessageList = Substitute.For<MessageListViewModel>(); StatusbarManager = Substitute.For<StatusBarManager>(); EventAggregator = Substitute.For<IEventAggregator>(); MessageFlow = Substitute.For<MessageFlowViewModel>(); SagaWindow = Substitute.For<SagaWindowViewModel>(); MessageBodyView = Substitute.For<MessageBodyViewModel>(); MessageProperties = Substitute.For<MessagePropertiesViewModel>(); View = Substitute.For<IShellViewStub>(); HeaderView = Substitute.For<MessageHeadersViewModel>(); SequenceDiagramView = Substitute.For<SequenceDiagramViewModel>(); SettingsProvider = Substitute.For<ISettingsProvider>(); LicenseManager = Substitute.For<AppLicenseManager>(); LogWindow = Substitute.For<LogWindowViewModel>(); SettingsProvider.GetSettings<ProfilerSettings>().Returns(DefaultAppSetting()); App = Substitute.For<IAppCommands>(); CommandLineArgParser = MockEmptyStartupOptions(); shell = new ShellViewModel( App, WindowManager, EndpointExplorer, MessageList, () => Substitute.For<ServiceControlConnectionViewModel>(), () => Substitute.For<LicenseRegistrationViewModel>(), StatusbarManager, EventAggregator, LicenseManager, MessageFlow, SagaWindow, MessageBodyView, HeaderView, SequenceDiagramView, SettingsProvider, MessageProperties, LogWindow, CommandLineArgParser); ((IViewAware)shell).AttachView(View); }