private static void ConfigureDotNetForFirstTimeUse( IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, bool hasSuperUserAccess, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider) { using (PerfTrace.Current.CaptureTiming()) { var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(hasSuperUserAccess, environmentProvider); var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true); var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator(); var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( firstTimeUseNoticeSentinel, aspNetCertificateSentinel, aspnetCertificateGenerator, toolPathSentinel, dotnetFirstRunConfiguration, Reporter.Output, CliFolderPathCalculator.CliFallbackFolderPath, environmentPath); dotnetConfigurer.Configure(); } }
private static void ConfigureDotNetForFirstTimeUse( IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, bool isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary <string, double> performanceMeasurements) { var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(isDotnetBeingInvokedFromNativeInstaller, environmentProvider); var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true); var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator(); var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( firstTimeUseNoticeSentinel, aspNetCertificateSentinel, aspnetCertificateGenerator, toolPathSentinel, dotnetFirstRunConfiguration, Reporter.Output, CliFolderPathCalculator.CliFallbackFolderPath, environmentPath, performanceMeasurements); dotnetConfigurer.Configure(); if (isDotnetBeingInvokedFromNativeInstaller && OperatingSystem.IsWindows()) { DotDefaultPathCorrector.Correct(); } }
private static void ConfigureDotNetForFirstTimeUse( IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, bool isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider) { using (PerfTrace.Current.CaptureTiming()) { var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(isDotnetBeingInvokedFromNativeInstaller, environmentProvider); var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true); var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator(); var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( firstTimeUseNoticeSentinel, aspNetCertificateSentinel, aspnetCertificateGenerator, toolPathSentinel, dotnetFirstRunConfiguration, Reporter.Output, CliFolderPathCalculator.CliFallbackFolderPath, environmentPath); dotnetConfigurer.Configure(); if (isDotnetBeingInvokedFromNativeInstaller && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { DotDefaultPathCorrector.Correct(); } } }
private static void ConfigureDotNetForFirstTimeUse( INuGetCacheSentinel nugetCacheSentinel, IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, CliFolderPathCalculator cliFolderPathCalculator, bool hasSuperUserAccess) { var environmentProvider = new EnvironmentProvider(); using (PerfTrace.Current.CaptureTiming()) { var nugetPackagesArchiver = new NuGetPackagesArchiver(); var environmentPath = EnvironmentPathFactory.CreateEnvironmentPath(cliFolderPathCalculator, hasSuperUserAccess, environmentProvider); var commandFactory = new DotNetCommandFactory(alwaysRunOutOfProc: true); var nugetCachePrimer = new NuGetCachePrimer( nugetPackagesArchiver, nugetCacheSentinel, cliFolderPathCalculator); var aspnetCertificateGenerator = new AspNetCoreCertificateGenerator(); var dotnetConfigurer = new DotnetFirstTimeUseConfigurer( nugetCachePrimer, nugetCacheSentinel, firstTimeUseNoticeSentinel, aspNetCertificateSentinel, aspnetCertificateGenerator, environmentProvider, Reporter.Output, cliFolderPathCalculator.CliFallbackFolderPath, environmentPath); dotnetConfigurer.Configure(); } }
public DotnetFirstTimeUseConfigurer( IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IAspNetCoreCertificateGenerator aspNetCoreCertificateGenerator, IFileSentinel toolPathSentinel, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IReporter reporter, string cliFallbackFolderPath, IEnvironmentPath pathAdder) { _firstTimeUseNoticeSentinel = firstTimeUseNoticeSentinel; _aspNetCertificateSentinel = aspNetCertificateSentinel; _aspNetCoreCertificateGenerator = aspNetCoreCertificateGenerator; _toolPathSentinel = toolPathSentinel; _dotnetFirstRunConfiguration = dotnetFirstRunConfiguration; _reporter = reporter; _cliFallbackFolderPath = cliFallbackFolderPath; _pathAdder = pathAdder ?? throw new ArgumentNullException(nameof(pathAdder)); }
public DotnetFirstTimeUseConfigurer( INuGetCachePrimer nugetCachePrimer, INuGetCacheSentinel nugetCacheSentinel, IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IAspNetCoreCertificateGenerator aspNetCoreCertificateGenerator, IEnvironmentProvider environmentProvider, IReporter reporter, string cliFallbackFolderPath, IEnvironmentPath pathAdder) { _nugetCachePrimer = nugetCachePrimer; _nugetCacheSentinel = nugetCacheSentinel; _firstTimeUseNoticeSentinel = firstTimeUseNoticeSentinel; _aspNetCertificateSentinel = aspNetCertificateSentinel; _aspNetCoreCertificateGenerator = aspNetCoreCertificateGenerator; _environmentProvider = environmentProvider; _reporter = reporter; _cliFallbackFolderPath = cliFallbackFolderPath; _pathAdder = pathAdder ?? throw new ArgumentNullException(nameof(pathAdder)); }