public PackageUninstaller(IInstallationStatusProvider installationStatusProvider, IPackageConfigurationAccessor packageConfigurationAccessor, IFilesystemAccessor filesystemAccessor, IPowerShellExecutor powerShellExecutor)
        {
            if (installationStatusProvider == null)
            {
                throw new ArgumentNullException("installationStatusProvider");
            }

            if (packageConfigurationAccessor == null)
            {
                throw new ArgumentNullException("packageConfigurationAccessor");
            }

            if (filesystemAccessor == null)
            {
                throw new ArgumentNullException("filesystemAccessor");
            }

            if (powerShellExecutor == null)
            {
                throw new ArgumentNullException("powerShellExecutor");
            }

            this.installationStatusProvider = installationStatusProvider;
            this.packageConfigurationAccessor = packageConfigurationAccessor;
            this.filesystemAccessor = filesystemAccessor;
            this.powerShellExecutor = powerShellExecutor;
        }
        public InstallationStatusProvider(ApplicationInformation applicationInformation, IPackageConfigurationAccessor packageConfigurationAccessor, IFilesystemAccessor filesystemAccessor)
        {
            if (applicationInformation == null)
            {
                throw new ArgumentNullException("applicationInformation");
            }

            if (packageConfigurationAccessor == null)
            {
                throw new ArgumentNullException("packageConfigurationAccessor");
            }

            if (filesystemAccessor == null)
            {
                throw new ArgumentNullException("filesystemAccessor");
            }

            this.applicationInformation = applicationInformation;
            this.packageConfigurationAccessor = packageConfigurationAccessor;
            this.filesystemAccessor = filesystemAccessor;
        }
        public void Setup()
        {
            var applicationInformation = ApplicationInformationProvider.GetApplicationInformation();

            var encodingProvider = new DefaultFileEncodingProvider();
            var fileSystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);
            var objectSerializer = new JSONObjectSerializer<PackageInfo[]>();
            IFilesystemPersistence<PackageInfo[]> packageInfoFilesystemPersistence = new FilesystemPersistence<PackageInfo[]>(
                fileSystemAccessor, objectSerializer);

            this.packageConfigurationAccessor = new PackageConfigurationAccessor(applicationInformation, packageInfoFilesystemPersistence);
        }
Example #4
0
        public PackageInstaller(ApplicationInformation applicationInformation, IFilesystemAccessor filesystemAccessor, IPackageConfigurationAccessor packageConfigurationAccessor, IPackageRepositoryBrowser packageRepositoryBrowser, IPowerShellExecutor powerShellExecutor, IInstallationLogicProvider installationLogicProvider, IPackageUninstaller packageUninstaller, INugetPackageExtractor nugetPackageExtractor, IPackageConfigurationTransformationService packageConfigurationTransformationService, IConfigurationFileTransformationService configurationFileTransformationService)
        {
            if (applicationInformation == null)
            {
                throw new ArgumentNullException("applicationInformation");
            }

            if (filesystemAccessor == null)
            {
                throw new ArgumentNullException("filesystemAccessor");
            }

            if (packageConfigurationAccessor == null)
            {
                throw new ArgumentNullException("packageConfigurationAccessor");
            }

            if (packageRepositoryBrowser == null)
            {
                throw new ArgumentNullException("packageRepositoryBrowser");
            }

            if (powerShellExecutor == null)
            {
                throw new ArgumentNullException("powerShellExecutor");
            }

            if (installationLogicProvider == null)
            {
                throw new ArgumentNullException("installationLogicProvider");
            }

            if (packageUninstaller == null)
            {
                throw new ArgumentNullException("packageUninstaller");
            }

            if (nugetPackageExtractor == null)
            {
                throw new ArgumentNullException("nugetPackageExtractor");
            }

            if (packageConfigurationTransformationService == null)
            {
                throw new ArgumentNullException("packageConfigurationTransformationService");
            }

            if (configurationFileTransformationService == null)
            {
                throw new ArgumentNullException("configurationFileTransformationService");
            }

            this.applicationInformation = applicationInformation;
            this.filesystemAccessor = filesystemAccessor;
            this.packageConfigurationAccessor = packageConfigurationAccessor;
            this.packageRepositoryBrowser = packageRepositoryBrowser;
            this.powerShellExecutor = powerShellExecutor;
            this.installationLogicProvider = installationLogicProvider;
            this.packageUninstaller = packageUninstaller;
            this.nugetPackageExtractor = nugetPackageExtractor;
            this.packageConfigurationTransformationService = packageConfigurationTransformationService;
            this.configurationFileTransformationService = configurationFileTransformationService;
        }