private DotNetCoreLanguageDetector CreateDotNetCoreLanguageDetector(
            string[] supportedVersions,
            string projectFile,
            IEnvironment environment)
        {
            var optionsSetup = new DotNetCoreScriptGeneratorOptionsSetup(environment);
            var options      = new DotNetCoreScriptGeneratorOptions();

            optionsSetup.Configure(options);

            return(new DotNetCoreLanguageDetector(
                       new TestVersionProvider(supportedVersions),
                       Options.Create(options),
                       new TestAspNetCoreWebAppProjectFileProvider(projectFile),
                       NullLogger <DotNetCoreLanguageDetector> .Instance));
        }
Exemplo n.º 2
0
        private DotNetCoreLanguageDetector CreateDotNetCoreLanguageDetector(
            Dictionary <string, string> supportedVersions,
            string defaultVersion,
            string projectFile,
            IEnvironment environment)
        {
            var optionsSetup = new DotNetCoreScriptGeneratorOptionsSetup(environment);
            var options      = new DotNetCoreScriptGeneratorOptions();

            optionsSetup.Configure(options);

            return(new DotNetCoreLanguageDetector(
                       new TestDotNetCoreVersionProvider(supportedVersions, defaultVersion),
                       Options.Create(options),
                       new TestProjectFileProvider(projectFile),
                       NullLogger <DotNetCoreLanguageDetector> .Instance,
                       new DefaultStandardOutputWriter()));
        }