Esempio n. 1
0
        void SetupDependencies()
        {
            // We could use a DI framework like zenject here but it's overkill
            // and also we'd like to keep the dependencies for Projeny low
            // So just do poor man's DI instead
            _asyncProcessor = new AsyncProcessor();

            _settings = Resources.Load <PmSettings>("Projeny/PmSettings");
            _view     = new PmView(_viewModel, _settings);

            _prjCommandHandler = new PrjCommandHandler(_view);

            _packageHandler  = new PmPackageHandler(_model, _prjCommandHandler, _view);
            _releasesHandler = new PmReleasesHandler(_model, _prjCommandHandler);

            _inputHandler       = new PmInputHandler(_view, _model, _packageHandler, _asyncProcessor);
            _viewErrorHandler   = new PmViewErrorHandler(_view, _asyncProcessor);
            _viewAsyncHandler   = new PmViewAsyncHandler(_view, _asyncProcessor, _settings);
            _viewModelSyncer    = new PmModelViewSyncer(_model, _view, _settings);
            _projectHandler     = new PmProjectHandler(_model, _view);
            _dragDropHandler    = new PmDragDropHandler(_model, _view, _asyncProcessor, _packageHandler, _prjCommandHandler);
            _packageViewHandler = new PmPackageViewHandler(_view, _asyncProcessor, _packageHandler, _prjCommandHandler, _settings);

            _windowInitializer       = new PmWindowInitializer(_projectHandler, _packageHandler, _releasesHandler, _asyncProcessor);
            _createNewProjectHandler = new PmCreateNewProjectPopupHandler(_view, _asyncProcessor, _prjCommandHandler, _windowInitializer);

            _projectViewHandler = new PmProjectViewHandler(
                _model, _view, _projectHandler, _asyncProcessor,
                _prjCommandHandler, _viewErrorHandler);

            _solutionViewHandler = new PmVsSolutionViewHandler(
                _model, _view, _asyncProcessor,
                _prjCommandHandler, _viewErrorHandler, _projectHandler);

            _releasesViewHandler = new PmReleasesViewHandler(
                _model, _view, _asyncProcessor, _releasesHandler, _packageHandler, _prjCommandHandler, _settings);
        }
Esempio n. 2
0
        void SetupDependencies()
        {
            // We could use a DI framework like zenject here but it's overkill
            // and also we'd like to keep the dependencies for Projeny low
            // So just do poor man's DI instead
            _asyncProcessor = new AsyncProcessor();

            _settings = Resources.Load<PmSettings>("Projeny/PmSettings");
            _view = new PmView(_viewModel, _settings);

            _prjCommandHandler = new PrjCommandHandler(_view);

            _packageHandler = new PmPackageHandler(_model, _prjCommandHandler, _view);
            _releasesHandler = new PmReleasesHandler(_model, _prjCommandHandler);

            _inputHandler = new PmInputHandler(_view, _model, _packageHandler, _asyncProcessor);
            _viewErrorHandler = new PmViewErrorHandler(_view, _asyncProcessor);
            _viewAsyncHandler = new PmViewAsyncHandler(_view, _asyncProcessor, _settings);
            _viewModelSyncer = new PmModelViewSyncer(_model, _view, _settings);
            _projectHandler = new PmProjectHandler(_model, _view);
            _dragDropHandler = new PmDragDropHandler(_model, _view, _asyncProcessor, _packageHandler, _prjCommandHandler);
            _packageViewHandler = new PmPackageViewHandler(_view, _asyncProcessor, _packageHandler, _prjCommandHandler, _settings);

            _windowInitializer = new PmWindowInitializer(_projectHandler, _packageHandler, _releasesHandler, _asyncProcessor);
            _createNewProjectHandler = new PmCreateNewProjectPopupHandler(_view, _asyncProcessor, _prjCommandHandler, _windowInitializer);

            _projectViewHandler = new PmProjectViewHandler(
                _model, _view, _projectHandler, _asyncProcessor,
                _prjCommandHandler, _viewErrorHandler);

            _solutionViewHandler = new PmVsSolutionViewHandler(
                _model, _view, _asyncProcessor,
                _prjCommandHandler, _viewErrorHandler, _projectHandler);

            _releasesViewHandler = new PmReleasesViewHandler(
                _model, _view, _asyncProcessor, _releasesHandler, _packageHandler, _prjCommandHandler, _settings);
        }