/// <summary> /// Returns an instance of <see cref="ElementDefinitionsBrowserViewModel"/> /// </summary> /// <param name="iteration">The associated <see cref="Iteration"/></param> /// <param name="session">The <see cref="ISession"/></param> /// <param name="thingDialogNavigationService">The <see cref="IThingDialogNavigationService"/></param> /// <param name="panelNavigationService">The <see cref="IPanelNavigationService"/></param> /// <returns>An instance of <see cref="ElementDefinitionsBrowserViewModel"/></returns> public static ElementDefinitionsBrowserViewModel InstantiatePanelViewModel(Iteration iteration, ISession session, IThingDialogNavigationService thingDialogNavigationService, IPanelNavigationService panelNavigationService, IDialogNavigationService dialogNavigationService, IPluginSettingsService pluginSettingsService) { var stopWatch = Stopwatch.StartNew(); var viewModel = new ElementDefinitionsBrowserViewModel(iteration, session, thingDialogNavigationService, panelNavigationService, dialogNavigationService, pluginSettingsService); stopWatch.Stop(); logger.Info("Open ElementDefinitionsBrowserViewModel took {0}", stopWatch.Elapsed); return(viewModel); }
/// <summary> /// Returns an instance of <see cref="ElementDefinitionsBrowserViewModel"/> /// </summary> /// <param name="iteration">The associated <see cref="Iteration"/></param> /// <param name="session">The <see cref="ISession"/></param> /// <param name="thingDialogNavigationService">The <see cref="IThingDialogNavigationService"/></param> /// <param name="panelNavigationService">The <see cref="IPanelNavigationService"/></param> /// <returns>An instance of <see cref="ElementDefinitionsBrowserViewModel"/></returns> public static ElementDefinitionsBrowserViewModel InstantiatePanelViewModel(Iteration iteration, ISession session, IThingDialogNavigationService thingDialogNavigationService, IPanelNavigationService panelNavigationService, IDialogNavigationService dialogNavigationService, IPluginSettingsService pluginSettingsService) { var stopWatch = Stopwatch.StartNew(); var parameterSubscriptionBatchService = ServiceLocator.Current.GetInstance <IParameterSubscriptionBatchService>(); var changeOwnershipBatchService = ServiceLocator.Current.GetInstance <IChangeOwnershipBatchService>(); var viewModel = new ElementDefinitionsBrowserViewModel(iteration, session, thingDialogNavigationService, panelNavigationService, dialogNavigationService, pluginSettingsService, parameterSubscriptionBatchService, changeOwnershipBatchService); stopWatch.Stop(); Logger.Info("The Element Definitions Browser opened in {0}", stopWatch.Elapsed.ToString("hh':'mm':'ss'.'fff")); return(viewModel); }