Пример #1
0
        /////////////////////////////////////////////////////////
        #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();
        }
Пример #2
0
        public SolutionGroup(IViewStateProvider viewStateProvider)
        {
            ViewStateProvider = viewStateProvider;

            GroupName = Empty;
            Solutions = new ObservableCollection <Solution>();
        }
Пример #3
0
        public Solution(IViewStateProvider viewStateProvider, IFileSystem fileSystem, SolutionGroup group,
                        string solutionPath)
        {
            ViewStateProvider = viewStateProvider;
            FileSystem        = fileSystem;

            ParentGroup  = group;
            SolutionPath = solutionPath;

            SolutionDisplayName = null;
            SolutionDirectory   = Empty;

            SolutionAvailable          = true;
            SolutionDirectoryAvailable = true;
        }
Пример #4
0
        /////////////////////////////////////////////////////////

        #region Constructors

        protected SolutionPageViewModelBase(IViewStateProvider viewStateProvider)
        {
            _viewStateProvider = viewStateProvider;
            _viewStateProvider.PropertyChanged += viewStateProvider_PropertyChanged;
        }
        /////////////////////////////////////////////////////////

        #region Constructors

        public SolutionPageViewModel(IViewStateProvider viewStateProvider)
            : base(viewStateProvider)
        {
        }