public LoadWorkspaceCommand(IApplicationShell appShell, IRInteractiveWorkflow interactiveWorkflow, IProjectServiceAccessor projectServiceAccessor) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdLoadWorkspace) { _appShell = appShell; _interactiveWorkflow = interactiveWorkflow; _rSession = interactiveWorkflow.RSession; _projectServiceAccessor = projectServiceAccessor; }
/// <summary> /// Retrieve the CPS enabled JoinableTaskFactory for the current version of Visual Studio. /// This overrides the default VsTaskLibraryHelper.ServiceInstance JTF. /// </summary> public static void SetJoinableTaskFactoryFromService(IProjectServiceAccessor projectServiceAccessor) { if (projectServiceAccessor == null) { throw new ArgumentNullException(nameof(projectServiceAccessor)); } if (_joinableTaskFactory == null) { _joinableTaskFactory = new Lazy <JoinableTaskFactory>(() => { #if VS14 // Use IThreadHandling.AsyncPump for Visual Studio 2015 ProjectService projectService = projectServiceAccessor.GetProjectService(); IThreadHandling threadHandling = projectService.Services.ThreadingPolicy; return(threadHandling.AsyncPump); #else // Use IProjectService for Visual Studio 2017 var projectService = projectServiceAccessor.GetProjectService(); return(projectService.Services.ThreadingPolicy.JoinableTaskFactory); #endif }, // This option helps avoiding deadlocks caused by CPS trying to create ProjectServiceHost // PublicationOnly mode lets parallel threads execute value factory method without // being blocked on each other. // It is correct behavior in this case as the value factory provides the same value // each time it is called and Lazy is used just for caching the value for perf reasons. LazyThreadSafetyMode.PublicationOnly); } }
public LaunchProfileDataProvider( IProjectServiceAccessor projectServiceAccessor, IProjectStateProvider projectStateProvider) : base(projectServiceAccessor) { _projectStateProvider = projectStateProvider; }
public SaveWorkspaceCommand(IRInteractiveWorkflow interactiveWorkflow, IProjectServiceAccessor projectServiceAccessor) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdSaveWorkspace) { _rSession = interactiveWorkflow.RSession; _projectServiceAccessor = projectServiceAccessor; _interactiveWorkflow = interactiveWorkflow; }
public LoadWorkspaceCommand(ICoreShell shell, IRInteractiveWorkflowVisual interactiveWorkflow, IProjectServiceAccessor projectServiceAccessor) : base(RGuidList.RCmdSetGuid, RPackageCommandId.icmdLoadWorkspace) { _shell = shell; _interactiveWorkflow = interactiveWorkflow; _rSession = interactiveWorkflow.RSession; _projectServiceAccessor = projectServiceAccessor; }
public DependenciesTreeSearchProvider( [ImportMany] IEnumerable <IDependenciesTreeSearchProvider> providers, JoinableTaskContext joinableTaskContext, IVsHierarchyItemManager hierarchyItemManager, IProjectServiceAccessor projectServiceAccessor, IRelationProvider relationProvider) { _providers = providers.ToImmutableArray(); _joinableTaskContext = joinableTaskContext; _hierarchyItemManager = hierarchyItemManager; _projectServiceAccessor = projectServiceAccessor; _relationProvider = relationProvider; }
public static void SetJoinableTaskFactoryFromService(IProjectServiceAccessor projectServiceAccessor) { Requires.NotNull(projectServiceAccessor, nameof(projectServiceAccessor)); if (_joinableTaskFactory == null) { _joinableTaskFactory = new Lazy <JoinableTaskFactory>(() => { // Use IProjectService for Visual Studio 2017 var projectService = projectServiceAccessor.GetProjectService(); return(projectService.Services.ThreadingPolicy.JoinableTaskFactory); }, // This option helps avoiding deadlocks caused by CPS trying to create ProjectServiceHost // PublicationOnly mode lets parallel threads execute value factory method without // being blocked on each other. // It is correct behavior in this case as the value factory provides the same value // each time it is called and Lazy is used just for caching the value for perf reasons. LazyThreadSafetyMode.PublicationOnly); } }
/// <summary> /// Retrieve the CPS enabled JoinableTaskFactory for the current version of Visual Studio. /// This overrides the default VsTaskLibraryHelper.ServiceInstance JTF. /// </summary> public static void SetJoinableTaskFactoryFromService(IProjectServiceAccessor projectServiceAccessor) { if (projectServiceAccessor == null) { throw new ArgumentNullException(nameof(projectServiceAccessor)); } if (_joinableTaskFactory == null) { _joinableTaskFactory = new Lazy <JoinableTaskFactory>(() => { #if VS14 // Use IThreadHandling.AsyncPump for Visual Studio 2015 ProjectService projectService = projectServiceAccessor.GetProjectService(); IThreadHandling threadHandling = projectService.Services.ThreadingPolicy; return(threadHandling.AsyncPump); #else // Use IProjectService for Visual Studio 2017 IProjectService projectService = projectServiceAccessor.GetProjectService(); return(projectService.Services.ThreadingPolicy.JoinableTaskFactory); #endif }); } }
public MissingSetupComponentRegistrationServiceInitializer(IProjectServiceAccessor projectServiceAccessor) { _projectServiceAccessor = projectServiceAccessor; }
public LaunchProfileUIPropertyDataProvider(IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
public CategoryDataProvider(IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
public UIPropertyDataProvider(IProjectServiceAccessor projectServiceAccessor, IPropertyPageQueryCacheProvider queryCacheProvider) : base(projectServiceAccessor) { _queryCacheProvider = queryCacheProvider; }
public PropertyPageDataProvider(IProjectServiceAccessor projectServiceAccessor, IProjectStateProvider projectStateProvider) : base(projectServiceAccessor) { _projectStateProvider = projectStateProvider; }
public LaunchProfileTypeDataProvider( IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
public LaunchProfileCategoryDataProvider(IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
protected QueryDataProviderBase(IProjectServiceAccessor projectServiceAccessor) { _projectService = new Lazy <IProjectService2>( () => (IProjectService2)projectServiceAccessor.GetProjectService(), System.Threading.LazyThreadSafetyMode.PublicationOnly); }
public IncrementalBuildFailureDetector( ISolutionBuildManager solutionBuildEvents, IRunningDocumentTable rdtEvents, IProjectServiceAccessor projectServiceAccessor, JoinableTaskContext joinableTaskContext) : base(new(joinableTaskContext))
public DotNetCoreProjectCompatibilityDetectorInitializer(IProjectServiceAccessor projectServiceAccessor) { _projectServiceAccessor = projectServiceAccessor; }
public PropertyPageDataProvider(IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
public ReferenceCleanupService(IProjectServiceAccessor projectServiceAccessor) { _projectService = new Lazy <IProjectService2>( () => (IProjectService2)projectServiceAccessor.GetProjectService(), LazyThreadSafetyMode.PublicationOnly); }
public UIPropertyEditorDataProvider(IProjectServiceAccessor projectServiceAccessor) : base(projectServiceAccessor) { }
public DependenciesGraphProjectContextProvider(IProjectExportProvider projectExportProvider, IProjectServiceAccessor projectServiceAccessor) { ProjectServiceAccessor = projectServiceAccessor; ProjectExportProvider = projectExportProvider; }
public ProjectExportProvider(IProjectServiceAccessor serviceAccessor) { ProjectServiceAccesspr = serviceAccessor; }
public DotNetCoreProjectCompatibilityDetectorInitializer(IProjectServiceAccessor projectServiceAccessor) { Requires.NotNull(projectServiceAccessor, nameof(projectServiceAccessor)); _projectServiceAccessor = projectServiceAccessor; }