8 references to WithLanguageVersion
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (8)
ScriptOptionsTests.cs (4)
22var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 29var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 30Assert.Same(options, options.WithLanguageVersion(LanguageVersion.CSharp8)); 37Assert.Throws<InvalidOperationException>(() => options.WithLanguageVersion(LanguageVersion.CSharp8));
ScriptTests.cs (4)
475var state0 = await CSharpScript.RunAsync("static int Add(int x, int y) => x + y;", options: ScriptOptions.WithLanguageVersion(LanguageVersion.Preview)); 955var script = CSharpScript.Create(@"string x = default;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp7)); 969string x = null;", ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8)); 991var script = CSharpScript.Create(code, ScriptOptions.WithLanguageVersion(LanguageVersion.CSharp8));