public WorkspaceProjectServices(
            IVsProjectAdapter vsProjectAdapter,
            INuGetProjectServices projectServices)
        {
            Assumes.Present(vsProjectAdapter);
            Assumes.Present(projectServices);

            _vsProjectAdapter = vsProjectAdapter;
            _fullProjectPath  = vsProjectAdapter.FullProjectPath;

            _workspaceService = projectServices.GetGlobalService <IDeferredProjectWorkspaceService>();
            Assumes.Present(_workspaceService);

            _threadingService = projectServices.GetGlobalService <IVsProjectThreadingService>();
            Assumes.Present(_threadingService);

            _buildProjectDataService = new AsyncLazy <IMSBuildProjectDataService>(
                () => _workspaceService.GetMSBuildProjectDataServiceAsync(_fullProjectPath),
                _threadingService.JoinableTaskFactory);
        }
示例#2
0
        public VsCoreProjectSystemReferenceReader(
            IVsProjectAdapter vsProjectAdapter,
            INuGetProjectServices projectServices)
        {
            Assumes.Present(vsProjectAdapter);
            Assumes.Present(projectServices);

            _vsProjectAdapter = vsProjectAdapter;

            _threadingService = projectServices.GetGlobalService <IVsProjectThreadingService>();
            Assumes.Present(_threadingService);
        }
        public VsProjectScriptHostService(
            IVsProjectAdapter vsProjectAdapter,
            INuGetProjectServices projectServices)
        {
            Assumes.Present(vsProjectAdapter);
            Assumes.Present(projectServices);

            _vsProjectAdapter = vsProjectAdapter;

            _scriptExecutor = new Lazy <IScriptExecutor>(
                () => projectServices.GetGlobalService <IScriptExecutor>());
        }
示例#4
0
 public T GetGlobalService <T> () where T : class
 {
     return(projectServices.GetGlobalService <T>());
 }