39 references to Default
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
ScriptOptionsTests.cs (3)
22var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 29var options = ScriptOptions.Default.WithLanguageVersion(LanguageVersion.CSharp8); 36var options = ScriptOptions.Default.WithParseOptions(new VisualBasicParseOptions(kind: SourceCodeKind.Script, languageVersion: VisualBasic.LanguageVersion.Latest));
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
134scriptOptions: ScriptOptions.Default.WithMetadataResolver(new ScriptMetadataResolver(referenceResolver)),
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
57return new Script<T>(compiler, new ScriptBuilder(assemblyLoaderOpt ?? new InteractiveAssemblyLoader()), sourceText, optionsOpt ?? ScriptOptions.Default, globalsTypeOpt, previousOpt: null);
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ScriptTestBase.cs (1)
37ScriptOptions = ScriptOptions.Default
Microsoft.CodeAnalysis.Scripting.UnitTests (32)
ScriptOptionsTests.cs (32)
25var options = ScriptOptions.Default. 40var options = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 63var empty = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 82var options = ScriptOptions.Default.WithReferences(ImmutableArray<MetadataReference>.Empty); 106var options = ScriptOptions.Default. 120var options = ScriptOptions.Default; 141var options = ScriptOptions.Default; 162var scriptOptions = ScriptOptions.Default.WithImports(["System", "System.IO"]); 170Assert.True(ScriptOptions.Default.WithEmitDebugInformation(true).EmitDebugInformation); 171Assert.False(ScriptOptions.Default.WithEmitDebugInformation(false).EmitDebugInformation); 172Assert.False(ScriptOptions.Default.EmitDebugInformation); 178var options = ScriptOptions.Default.WithEmitDebugInformation(true); 185var options = ScriptOptions.Default.WithFileEncoding(Encoding.ASCII); 192var options = ScriptOptions.Default.WithFileEncoding(Encoding.ASCII); 199Assert.True(ScriptOptions.Default.WithAllowUnsafe(true).AllowUnsafe); 200Assert.False(ScriptOptions.Default.WithAllowUnsafe(false).AllowUnsafe); 201Assert.True(ScriptOptions.Default.AllowUnsafe); 209var options = ScriptOptions.Default.WithAllowUnsafe(allowUnsafe); 218var scriptOptions = ScriptOptions.Default.WithAllowUnsafe(allowUnsafe); 226Assert.True(ScriptOptions.Default.WithCheckOverflow(true).CheckOverflow); 227Assert.False(ScriptOptions.Default.WithCheckOverflow(false).CheckOverflow); 228Assert.False(ScriptOptions.Default.CheckOverflow); 236var options = ScriptOptions.Default.WithCheckOverflow(checkOverflow); 245var scriptOptions = ScriptOptions.Default.WithCheckOverflow(checkOverflow); 255Assert.Equal(ScriptOptions.Default.WithOptimizationLevel(optimizationLevel).OptimizationLevel, optimizationLevel); 256Assert.Equal(OptimizationLevel.Debug, ScriptOptions.Default.OptimizationLevel); 264var options = ScriptOptions.Default.WithOptimizationLevel(optimizationLevel); 273var scriptOptions = ScriptOptions.Default.WithOptimizationLevel(optimizationLevel); 286Assert.Equal(ScriptOptions.Default.WithWarningLevel(warningLevel).WarningLevel, warningLevel); 287Assert.Equal(4, ScriptOptions.Default.WarningLevel); 298var options = ScriptOptions.Default.WithWarningLevel(warningLevel); 310var scriptOptions = ScriptOptions.Default.WithWarningLevel(warningLevel);
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
ScriptTests.vb (1)
77Assert.Empty(ScriptOptions.Default.Imports)