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 MessageNode(MessageFlowViewModel owner, StoredMessage message) { IsResizable = false; Owner = owner; Data = message; ExceptionMessage = message.GetHeaderByKey(MessageHeaderKeys.ExceptionType); SagaType = ProcessSagaType(message); heightNoEndpoints += HasSaga ? 10 : 0; Bounds = new Rect(0, 0, 203, heightNoEndpoints); CopyConversationIDCommand = owner.CopyConversationIDCommand; CopyMessageURICommand = owner.CopyMessageURICommand; SearchByMessageIDCommand = owner.SearchByMessageIDCommand; RetryMessageCommand = owner.RetryMessageCommand; message.ObservableForProperty(m => m.Status).Subscribe(_ => { OnPropertyChanged("HasFailed"); OnPropertyChanged("HasRetried"); }); }
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 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); }