///////////////////////////////////////////////////////// #region Constructors /// <summary> /// Initializes a new instance of the <see cref="SolutionPagePresenter"/> class. /// </summary> /// <param name="view">The view.</param> /// <param name="viewModel">The view model.</param> /// <param name="model">The model.</param> /// <param name="viewStateProvider">A common <see cref="IViewStateProvider"/>.</param> /// <param name="fileSystem">The file sytem access.</param> /// <param name="systemInterface">The interface for system operations.</param> /// <param name="userIOInterface">The user IO interface.</param> /// <param name="ide">Information about the current Visual Studio instance.</param> /// <exception cref="ArgumentNullException">Any parameter is null.</exception> public SolutionPagePresenter([NotNull] ISolutionPageView view, [NotNull] ISolutionPageViewModel viewModel, [NotNull] ISolutionPageModel model, [NotNull] IViewStateProvider viewStateProvider, [NotNull] IFileSystem fileSystem, [NotNull] ISystemInterface systemInterface, [NotNull] IUserIOInterface userIOInterface, [NotNull] IIde ide) : base(view, viewModel) { ThrowIfNull(model, nameof(model)); ThrowIfNull(viewStateProvider, nameof(viewStateProvider)); ThrowIfNull(fileSystem, nameof(fileSystem)); ThrowIfNull(systemInterface, nameof(systemInterface)); ThrowIfNull(userIOInterface, nameof(userIOInterface)); ThrowIfNull(ide, nameof(ide)); _model = model; _viewStateProvider = viewStateProvider; _fileSystem = fileSystem; _systemInterface = systemInterface; _userIOInterface = userIOInterface; _ide = ide; _configuration = _model.LoadConfiguration(); }
///////////////////////////////////////////////////////// #region Base Overrides protected override async Task View_Loaded(object sender, RoutedEventArgs e) { _configuration = await _model.LoadConfiguration().ConfigureAwait(true); ComputeConfigurationProperties(); PrepareLoadedData(); ConnectEventHandler(); View.ConnectDataSource(ViewModel); FillDefault(); }