Ejemplo n.º 1
0
        private PackageRestoreInitiatorInstance CreateInstance(UnconfiguredProject project = null, IPackageRestoreUnconfiguredDataSource dataSource = null, IVsSolutionRestoreService3 solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.Create();
            dataSource ??= IPackageRestoreUnconfiguredDataSourceFactory.Create();
            IProjectThreadingService         threadingService = IProjectThreadingServiceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectLogger logger = IProjectLoggerFactory.Create();

            return(new PackageRestoreInitiatorInstance(project, dataSource, threadingService, projectAsynchronousTasksService, solutionRestoreService, logger));
        }
        private PackageRestoreDataSource CreateInstance(UnconfiguredProject?project = null, IPackageRestoreUnconfiguredInputDataSource?dataSource = null, IVsSolutionRestoreService3?solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.Create(IProjectThreadingServiceFactory.Create());
            dataSource ??= IPackageRestoreUnconfiguredInputDataSourceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectLogger logger     = IProjectLoggerFactory.Create();
            IFileSystem    fileSystem = IFileSystemFactory.Create();

            return(new PackageRestoreDataSource(
                       project,
                       dataSource,
                       projectAsynchronousTasksService,
                       solutionRestoreService,
                       fileSystem,
                       logger));
        }
Ejemplo n.º 3
0
        private static PackageRestoreDataSource CreateInstance(UnconfiguredProject?project = null, IPackageRestoreUnconfiguredInputDataSource?dataSource = null, IVsSolutionRestoreService3?solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.Create(IProjectThreadingServiceFactory.Create());
            dataSource ??= IPackageRestoreUnconfiguredInputDataSourceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectDiagnosticOutputService logger = IProjectDiagnosticOutputServiceFactory.Create();
            IFileSystem fileSystem = IFileSystemFactory.Create();
            var         projectDependentFileChangeNotificationService = IProjectDependentFileChangeNotificationServiceFactory.Create();

            return(new PackageRestoreDataSource(
                       project,
                       dataSource,
                       projectAsynchronousTasksService,
                       solutionRestoreService,
                       fileSystem,
                       logger,
                       projectDependentFileChangeNotificationService));
        }
        private PackageRestoreServiceInstance CreateInstance(UnconfiguredProject?project = null, IPackageRestoreUnconfiguredInputDataSource?dataSource = null, IVsSolutionRestoreService3?solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.Create();
            dataSource ??= IPackageRestoreUnconfiguredInputDataSourceFactory.Create();
            IProjectThreadingService         threadingService = IProjectThreadingServiceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectLogger logger         = IProjectLoggerFactory.Create();
            IFileSystem    fileSystem     = IFileSystemFactory.Create();
            var            broadcastBlock = DataflowBlockSlim.CreateBroadcastBlock <IProjectVersionedValue <RestoreData> >();

            return(new PackageRestoreServiceInstance(
                       project,
                       dataSource,
                       threadingService,
                       projectAsynchronousTasksService,
                       solutionRestoreService,
                       fileSystem,
                       logger,
                       broadcastBlock));
        }
        private static PackageRestoreDataSource CreateInstance(UnconfiguredProject?project = null, IPackageRestoreUnconfiguredInputDataSource?dataSource = null, IVsSolutionRestoreService3?solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.CreateWithActiveConfiguredProjectProvider(IProjectThreadingServiceFactory.Create());
            dataSource ??= IPackageRestoreUnconfiguredInputDataSourceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectDiagnosticOutputService logger = IProjectDiagnosticOutputServiceFactory.Create();
            IFileSystem fileSystem = IFileSystemFactory.Create();
            var         vsSolutionRestoreService4    = IVsSolutionRestoreService4Factory.ImplementRegisterRestoreInfoSourceAsync();
            var         sharedJoinableTaskCollection = new PackageRestoreSharedJoinableTaskCollection(IProjectThreadingServiceFactory.Create());

            return(new PackageRestoreDataSourceMocked(
                       project,
                       dataSource,
                       projectAsynchronousTasksService,
                       solutionRestoreService,
                       fileSystem,
                       logger,
                       vsSolutionRestoreService4,
                       sharedJoinableTaskCollection));
        }
        private PackageRestoreDataSource CreateInstance(UnconfiguredProject?project = null, IPackageRestoreUnconfiguredInputDataSource?dataSource = null, IVsSolutionRestoreService3?solutionRestoreService = null)
        {
            project ??= UnconfiguredProjectFactory.Create(IProjectThreadingServiceFactory.Create());
            dataSource ??= IPackageRestoreUnconfiguredInputDataSourceFactory.Create();
            IProjectAsynchronousTasksService projectAsynchronousTasksService = IProjectAsynchronousTasksServiceFactory.Create();

            solutionRestoreService ??= IVsSolutionRestoreServiceFactory.Create();
            IProjectLogger logger          = IProjectLoggerFactory.Create();
            IFileSystem    fileSystem      = IFileSystemFactory.Create();
            var            hintService     = new Lazy <IProjectChangeHintSubmissionService>(() => IProjectChangeHintSubmissionServiceFactory.Create());
            var            projectAccessor = IProjectAccessorFactory.Create();
            var            packageReferenceTelemetryService = IUnconfiguredProjectPackageRestoreTelemetryServiceFactory.Create();

            return(new PackageRestoreDataSource(
                       project,
                       dataSource,
                       projectAsynchronousTasksService,
                       solutionRestoreService,
                       fileSystem,
                       hintService,
                       projectAccessor,
                       logger,
                       packageReferenceTelemetryService));
        }