コード例 #1
0
        private static async Task <StartupProjectRegistrar> CreateInitializedInstanceAsync(
            IVsStartupProjectsListService?vsStartupProjectsListService = null,
            IProjectThreadingService?threadingService  = null,
            ISafeProjectGuidService?projectGuidService = null,
            IActiveConfiguredProjectSubscriptionService?projectSubscriptionService = null,
            IActiveConfiguredValues <IDebugLaunchProvider>?launchProviders         = null)
        {
            var instance = CreateInstance(vsStartupProjectsListService, threadingService, projectGuidService, projectSubscriptionService, launchProviders);
            await instance.InitializeAsync();

            return(instance);
        }
コード例 #2
0
 public StartupProjectRegistrar(
     UnconfiguredProject project,
     IUnconfiguredProjectTasksService projectTasksService,
     IVsService <SVsStartupProjectsListService, IVsStartupProjectsListService> startupProjectsListService,
     IProjectThreadingService threadingService,
     ISafeProjectGuidService projectGuidService,
     IActiveConfiguredProjectSubscriptionService projectSubscriptionService,
     IActiveConfiguredValues <IDebugLaunchProvider> launchProviders)
     : base(threadingService.JoinableTaskContext)
 {
     _project                    = project;
     _projectTasksService        = projectTasksService;
     _startupProjectsListService = startupProjectsListService;
     _projectGuidService         = projectGuidService;
     _projectSubscriptionService = projectSubscriptionService;
     _launchProviders            = launchProviders;
 }
コード例 #3
0
        private static StartupProjectRegistrar CreateInstance(
            IVsStartupProjectsListService?vsStartupProjectsListService = null,
            IProjectThreadingService?threadingService  = null,
            ISafeProjectGuidService?projectGuidService = null,
            IActiveConfiguredProjectSubscriptionService?projectSubscriptionService = null,
            IActiveConfiguredValues <IDebugLaunchProvider>?launchProviders         = null)
        {
            var project  = UnconfiguredProjectFactory.Create();
            var instance = new StartupProjectRegistrar(
                project,
                IUnconfiguredProjectTasksServiceFactory.Create(),
                IVsServiceFactory.Create <SVsStartupProjectsListService, IVsStartupProjectsListService?>(vsStartupProjectsListService !),
                threadingService ?? IProjectThreadingServiceFactory.Create(),
                projectGuidService ?? ISafeProjectGuidServiceFactory.ImplementGetProjectGuidAsync(Guid.NewGuid()),
                projectSubscriptionService ?? IActiveConfiguredProjectSubscriptionServiceFactory.Create(),
                launchProviders !);

            return(instance);
        }