public VsMSBuildProjectSystemServices( IVsProjectAdapter vsProjectAdapter, VsMSBuildProjectSystem vsProjectSystem, IVsProjectThreadingService threadingService, Lazy <IScriptExecutor> scriptExecutor) { Assumes.Present(vsProjectAdapter); Assumes.Present(vsProjectSystem); Assumes.Present(threadingService); Assumes.Present(scriptExecutor); _vsProjectAdapter = vsProjectAdapter; _vsProjectSystem = vsProjectSystem; _threadingService = threadingService; if (vsProjectSystem is NativeProjectSystem) { ReferencesReader = new NativeProjectSystemReferencesReader(vsProjectAdapter, _threadingService); } else if (vsProjectSystem is CpsProjectSystem) { ReferencesReader = new CpsProjectSystemReferenceReader(vsProjectAdapter, _threadingService); } else { ReferencesReader = new VsCoreProjectSystemReferenceReader(vsProjectAdapter, _threadingService); } ScriptService = new VsProjectScriptHostService(vsProjectAdapter, scriptExecutor); }
private VsPackageRestorer CreateTarget( ISettings settings = null, ISolutionManager solutionManager = null, IPackageRestoreManager restoreManager = null, IVsProjectThreadingService threadingService = null, INuGetTelemetryProvider telemetryProvider = null) { if (settings == null) { settings = new Mock <ISettings>().Object; } if (solutionManager == null) { solutionManager = new Mock <ISolutionManager>().Object; } if (restoreManager == null) { restoreManager = new Mock <IPackageRestoreManager>().Object; } if (threadingService == null) { threadingService = new TestProjectThreadingService(); } if (telemetryProvider == null) { // Use strict mode, as known/expected errors should not post faults. telemetryProvider = new Mock <INuGetTelemetryProvider>(MockBehavior.Strict).Object; } return(new VsPackageRestorer(settings, solutionManager, restoreManager, threadingService, telemetryProvider)); }
public LegacyPackageReferenceProject( IVsProjectAdapter vsProjectAdapter, string projectId, INuGetProjectServices projectServices, IVsProjectThreadingService threadingService) { Assumes.Present(vsProjectAdapter); Assumes.NotNullOrEmpty(projectId); Assumes.Present(projectServices); Assumes.Present(threadingService); _vsProjectAdapter = vsProjectAdapter; _threadingService = threadingService; _projectName = _vsProjectAdapter.ProjectName; _projectUniqueName = _vsProjectAdapter.UniqueName; _projectFullPath = _vsProjectAdapter.FullProjectPath; ProjectStyle = ProjectStyle.PackageReference; InternalMetadata.Add(NuGetProjectMetadataKeys.Name, _projectName); InternalMetadata.Add(NuGetProjectMetadataKeys.UniqueName, _projectUniqueName); InternalMetadata.Add(NuGetProjectMetadataKeys.FullPath, _projectFullPath); InternalMetadata.Add(NuGetProjectMetadataKeys.ProjectId, projectId); ProjectServices = projectServices; }
public LegacyPackageReferenceProjectProvider( Lazy <IDeferredProjectWorkspaceService> workspaceService, IVsProjectThreadingService threadingService) : this(AsyncServiceProvider.GlobalProvider, workspaceService, threadingService) { }
public LegacyPackageReferenceProjectProvider( IVsProjectThreadingService threadingService, Lazy <IScriptExecutor> scriptExecutor) : this(AsyncServiceProvider.GlobalProvider, threadingService, scriptExecutor) { }
public VsProjectAdapterProvider( [Import(typeof(SAsyncServiceProvider))] IAsyncServiceProvider serviceProvider, IVsProjectThreadingService threadingService) : this( threadingService, new AsyncLazy <SVsSolution>(() => serviceProvider.GetServiceAsync <SVsSolution, SVsSolution>(throwOnFailure : false), threadingService.JoinableTaskFactory)) { }
public VsProjectAdapterProvider( [Import(typeof(SAsyncServiceProvider))] IAsyncServiceProvider serviceProvider, IVsProjectThreadingService threadingService) : this( threadingService, new AsyncLazy <IDeferredProjectWorkspaceService>(() => serviceProvider.GetServiceAsync <IDeferredProjectWorkspaceService>(), threadingService.JoinableTaskFactory), new AsyncLazy <IVsSolution5>(() => serviceProvider.GetServiceAsync <SVsSolution, IVsSolution5>(), threadingService.JoinableTaskFactory)) { }
public VsCoreProjectBuildProperties( EnvDTE.Project project, IVsProjectThreadingService threadingService) { Assumes.Present(project); Assumes.Present(threadingService); _project = project; _threadingService = threadingService; }
public VsManagedLanguagesProjectBuildProperties( IVsBuildPropertyStorage propertyStorage, IVsProjectThreadingService threadingService) { Assumes.Present(propertyStorage); Assumes.Present(threadingService); _propertyStorage = propertyStorage; _threadingService = threadingService; }
internal VsProjectAdapterProvider( IVsProjectThreadingService threadingService, AsyncLazy <SVsSolution> vsSolution) { Assumes.Present(threadingService); Assumes.Present(vsSolution); _threadingService = threadingService; _vsSolution = vsSolution; }
public MSBuildNuGetProjectProvider( IAsyncServiceProvider vsServiceProvider, IVsProjectThreadingService threadingService, Lazy <IScriptExecutor> scriptExecutor) { Assumes.Present(vsServiceProvider); Assumes.Present(threadingService); Assumes.Present(scriptExecutor); _threadingService = threadingService; _scriptExecutor = scriptExecutor; }
public LegacyPackageReferenceProjectProvider( IAsyncServiceProvider vsServiceProvider, IVsProjectThreadingService threadingService, Lazy <IScriptExecutor> scriptExecutor) { Assumes.Present(vsServiceProvider); Assumes.Present(threadingService); Assumes.Present(scriptExecutor); _threadingService = threadingService; _scriptExecutor = scriptExecutor; }
public VsCoreProjectSystemReferenceReader( IVsProjectAdapter vsProjectAdapter, INuGetProjectServices projectServices) { Assumes.Present(vsProjectAdapter); Assumes.Present(projectServices); _vsProjectAdapter = vsProjectAdapter; _threadingService = projectServices.GetGlobalService <IVsProjectThreadingService>(); Assumes.Present(_threadingService); }
public VsCoreProjectSystemReferenceReader( IVsProjectAdapter vsProjectAdapter, IVsProjectThreadingService threadingService) { Assumes.Present(vsProjectAdapter); Assumes.Present(threadingService); _vsProjectAdapter = vsProjectAdapter; _threadingService = threadingService; _referenceMetadata = new string[] { "ReferenceOutputAssembly" }; }
public VsProjectBuildProperties( Lazy <Project> project, IVsBuildPropertyStorage propertyStorage, IVsProjectThreadingService threadingService) { Assumes.Present(project); Assumes.Present(threadingService); _dteProject = project; _propertyStorage = propertyStorage; _threadingService = threadingService; }
internal VsProjectAdapterProvider( IVsProjectThreadingService threadingService, AsyncLazy <IDeferredProjectWorkspaceService> workspaceService, AsyncLazy <IVsSolution5> vsSolution5) { Assumes.Present(threadingService); Assumes.Present(workspaceService); Assumes.Present(vsSolution5); _threadingService = threadingService; _workspaceService = workspaceService; _vsSolution5 = vsSolution5; }
public VsPackageRestorer( Configuration.ISettings settings, ISolutionManager solutionManager, IPackageRestoreManager restoreManager, IVsProjectThreadingService threadingService, INuGetTelemetryProvider telemetryProvider) { _settings = settings; _solutionManager = solutionManager; _restoreManager = restoreManager; _threadingService = threadingService; _telemetryProvider = telemetryProvider; }
public MSBuildNuGetProjectProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider vsServiceProvider, IVsProjectThreadingService threadingService) { Assumes.Present(vsServiceProvider); Assumes.Present(threadingService); _threadingService = threadingService; _componentModel = new Lazy <IComponentModel>( () => vsServiceProvider.GetService <SComponentModel, IComponentModel>()); }
public VsProjectAdapterProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, Lazy <IDeferredProjectWorkspaceService> workspaceService, IVsProjectThreadingService threadingService) { Assumes.Present(serviceProvider); Assumes.Present(threadingService); Assumes.Present(workspaceService); _workspaceService = workspaceService; _threadingService = threadingService; _vsSolution = new Lazy <IVsSolution>(() => serviceProvider.GetService <SVsSolution, IVsSolution>()); }
public LegacyPackageReferenceProject( IVsProjectAdapter vsProjectAdapter, string projectId, INuGetProjectServices projectServices, IVsProjectThreadingService threadingService, NuGetFramework targetFramework) : this(vsProjectAdapter, projectId, projectServices, threadingService) { Assumes.NotNull(targetFramework); TargetFramework = targetFramework; }
public VsPackageInstallerServices( IVsSolutionManager solutionManager, ISourceRepositoryProvider sourceRepositoryProvider, ISettings settings, IDeleteOnRestartManager deleteOnRestartManager, IVsProjectThreadingService threadingService, INuGetTelemetryProvider telemetryProvider) { _solutionManager = solutionManager; _sourceRepositoryProvider = sourceRepositoryProvider; _deleteOnRestartManager = deleteOnRestartManager; _settings = settings; _threadingService = threadingService; _telemetryProvider = telemetryProvider; }
public NativeProjectSystemReferencesReader( IVsProjectAdapter vsProjectAdapter, IVsProjectThreadingService threadingService) { Assumes.Present(vsProjectAdapter); Assumes.Present(threadingService); _vsProjectAdapter = vsProjectAdapter; _threadingService = threadingService; _vcProject = new AsyncLazy <VCProject>(async() => { await threadingService.JoinableTaskFactory.SwitchToMainThreadAsync(); return(_vsProjectAdapter.Project.Object as VCProject); }, threadingService.JoinableTaskFactory); }
public VsCoreProjectSystemServices( IVsProjectAdapter vsProjectAdapter, IComponentModel componentModel) : base(componentModel) { Assumes.Present(vsProjectAdapter); _vsProjectAdapter = vsProjectAdapter; _threadingService = GetGlobalService <IVsProjectThreadingService>(); Assumes.Present(_threadingService); ReferencesReader = new VsCoreProjectSystemReferenceReader(vsProjectAdapter, this); ScriptService = new VsProjectScriptHostService(vsProjectAdapter, this); }
public VsCoreProjectSystemServices( IVsProjectAdapter vsProjectAdapter, IVsProjectThreadingService threadingService, Lazy <IScriptExecutor> _scriptExecutor) { Assumes.Present(vsProjectAdapter); Assumes.Present(threadingService); _vsProjectAdapter = vsProjectAdapter; _threadingService = threadingService; ProjectSystem = new VsCoreProjectSystem(_vsProjectAdapter); ReferencesReader = new VsCoreProjectSystemReferenceReader(vsProjectAdapter, threadingService); ScriptService = new VsProjectScriptHostService(vsProjectAdapter, _scriptExecutor); }
public WorkspaceProjectBuildProperties( string fullProjectPath, IDeferredProjectWorkspaceService workspaceService, IVsProjectThreadingService threadingService) { Assumes.Present(workspaceService); Assumes.Present(threadingService); _workspaceService = workspaceService; _threadingService = threadingService; _fullProjectPath = fullProjectPath; _buildProjectDataService = new AsyncLazy <IMSBuildProjectDataService>( () => workspaceService.GetMSBuildProjectDataServiceAsync(_fullProjectPath), threadingService.JoinableTaskFactory); }
public ProjectJsonProjectProvider( IAsyncServiceProvider vsServiceProvider, IVsProjectThreadingService threadingService) { Assumes.Present(vsServiceProvider); Assumes.Present(threadingService); _threadingService = threadingService; _componentModel = new AsyncLazy <IComponentModel>( async() => { return(await vsServiceProvider.GetServiceAsync <SComponentModel, IComponentModel>()); }, _threadingService.JoinableTaskFactory); }
public VsManagedLanguagesProjectSystemServices( IVsProjectAdapter vsProjectAdapter, IComponentModel componentModel) : base(componentModel) { Assumes.Present(vsProjectAdapter); _vsProjectAdapter = vsProjectAdapter; _threadingService = GetGlobalService <IVsProjectThreadingService>(); Assumes.Present(_threadingService); _asVSProject4 = new Lazy <VSProject4>(() => vsProjectAdapter.Project.Object as VSProject4); ScriptService = new VsProjectScriptHostService(vsProjectAdapter, this); }
public VsProjectAdapter( VsHierarchyItem vsHierarchyItem, ProjectNames projectNames, string fullProjectPath, Func <IVsHierarchy, EnvDTE.Project> loadDteProject, IProjectBuildProperties buildProperties, IVsProjectThreadingService threadingService) { Assumes.Present(vsHierarchyItem); _vsHierarchyItem = vsHierarchyItem; _dteProject = new Lazy <EnvDTE.Project>(() => loadDteProject(_vsHierarchyItem.VsHierarchy)); _threadingService = threadingService; FullProjectPath = fullProjectPath; ProjectNames = projectNames; BuildProperties = buildProperties; }
public LegacyPackageReferenceProjectProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider vsServiceProvider, IVsProjectThreadingService threadingService) { Assumes.Present(vsServiceProvider); Assumes.Present(threadingService); _threadingService = threadingService; _componentModel = new AsyncLazy <IComponentModel>( async() => { await _threadingService.JoinableTaskFactory.SwitchToMainThreadAsync(); return(vsServiceProvider.GetService <SComponentModel, IComponentModel>()); }, _threadingService.JoinableTaskFactory); }
public LegacyPackageReferenceProjectProvider( IAsyncServiceProvider vsServiceProvider, Lazy <IDeferredProjectWorkspaceService> workspaceService, IVsProjectThreadingService threadingService) { Assumes.Present(vsServiceProvider); Assumes.Present(workspaceService); Assumes.Present(threadingService); _workspaceService = workspaceService; _threadingService = threadingService; _componentModel = new AsyncLazy <IComponentModel>( async() => { return(await vsServiceProvider.GetServiceAsync <SComponentModel, IComponentModel>()); }, _threadingService.JoinableTaskFactory); }