1 type derived from Script
Microsoft.CodeAnalysis.Scripting (1)
Script.cs (1)
340public sealed class Script<T> : Script
47 references to Script
Microsoft.CodeAnalysis.CSharp.Scripting (4)
CSharpScript.cs (2)
37return Script.CreateInitialScript<T>(CSharpScriptCompiler.Instance, SourceText.From(code, options?.FileEncoding, SourceHashAlgorithms.Default), options, globalsType, assemblyLoader); 54return Script.CreateInitialScript<T>(CSharpScriptCompiler.Instance, SourceText.From(code, options?.FileEncoding), options, globalsType, assemblyLoader);
CSharpScriptCompiler.cs (1)
33public override Compilation CreateSubmission(Script script)
Hosting\CommandLine\Csi.cs (1)
29_createFromFileFunc = createFromFileFunc ?? Script.CreateFromFile;
Microsoft.CodeAnalysis.InteractiveHost (2)
Interactive\Core\InteractiveHost.Service.cs (2)
649private Script<object>? TryCompile(Script? previousScript, string code, string? path, ScriptOptions options) 653Script script;
Microsoft.CodeAnalysis.Scripting (36)
Hosting\CommandLine\CommandLineRunner.cs (4)
45_createFromFileFunc = createFromFileFunc ?? Script.CreateFromFile; 207var script = Script.CreateInitialScript<int>(_scriptCompiler, code, options, globals.GetType(), assemblyLoaderOpt: null); 233var script = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(initialScriptCodeOpt), options, globals.GetType(), assemblyLoaderOpt: null); 285newScript = Script.CreateInitialScript<object>(_scriptCompiler, SourceText.From(code ?? string.Empty), options, globals.GetType(), assemblyLoaderOpt: null);
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
91_createFromFileFunc = createFromfileFunc ?? ((path, properties) => Script.CreateFromFile(path, PEStreamOptions.PrefetchEntireImage, properties));
Script.cs (23)
40internal Script(ScriptCompiler compiler, ScriptBuilder builder, SourceText sourceText, ScriptOptions options, Type globalsTypeOpt, Script previousOpt) 65public Script Previous { get; } 95public Script WithOptions(ScriptOptions options) => WithOptionsInternal(options); 96internal abstract Script WithOptionsInternal(ScriptOptions options); 160/// An instance of <see cref="Script.GlobalsType"/> holding on values of global variables accessible from the script. 161/// Must be specified if and only if the script was created with a <see cref="Script.GlobalsType"/>. 174/// An instance of <see cref="Script.GlobalsType"/> holding on values for global variables accessible from the script. 175/// Must be specified if and only if the script was created with <see cref="Script.GlobalsType"/>. 186/// An instance of <see cref="Script.GlobalsType"/> holding on values for global variables accessible from the script. 187/// Must be specified if and only if the script was created with <see cref="Script.GlobalsType"/>. 345internal Script(ScriptCompiler compiler, ScriptBuilder builder, SourceText sourceText, ScriptOptions options, Type globalsTypeOpt, Script previousOpt) 357internal override Script WithOptionsInternal(ScriptOptions options) => WithOptions(options); 412private ImmutableArray<Func<object[], Task>> TryGetPrecedingExecutors(Script lastExecutedScriptInChainOpt, CancellationToken cancellationToken) 414Script script = Previous; 420var scriptsReversed = ArrayBuilder<Script>.GetInstance(); 450/// An instance of <see cref="Script.GlobalsType"/> holding on values of global variables accessible from the script. 451/// Must be specified if and only if the script was created with a <see cref="Script.GlobalsType"/>. 462/// An instance of <see cref="Script.GlobalsType"/> holding on values for global variables accessible from the script. 463/// Must be specified if and only if the script was created with <see cref="Script.GlobalsType"/>. 468/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match <see cref="Script.GlobalsType"/>.</exception> 476/// An instance of <see cref="Script.GlobalsType"/> holding on values for global variables accessible from the script. 477/// Must be specified if and only if the script was created with <see cref="Script.GlobalsType"/>. 486/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match <see cref="Script.GlobalsType"/>.</exception>
ScriptCompiler.cs (1)
16public abstract Compilation CreateSubmission(Script script);
ScriptOptions.cs (3)
85/// (<see cref="Script.RunAsync(object, CancellationToken)"/>. 178CreateFromFileFunc = createFromFileFunc ?? Script.CreateFromFile; 270Script.CreateFromAssembly(assembly, s_assemblyReferenceProperties, CreateFromFileFunc);
ScriptRunner.cs (1)
18/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match the corresponding <see cref="Script.GlobalsType"/>.</exception>
ScriptState.cs (3)
26public Script Script { get; } 42internal ScriptState(ScriptExecutionState executionState, Script script, Exception exceptionOpt) 275internal ScriptState(ScriptExecutionState executionState, Script script, T value, Exception exceptionOpt)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
ScriptingTestHelpers.cs (1)
60internal static void AssertCompilationError(Script script, params DiagnosticDescription[] expectedDiagnostics)
Microsoft.CodeAnalysis.VisualBasic.Scripting (4)
Hosting\CommandLine\Vbi.vb (1)
23createFromFileFunc = AddressOf Script.CreateFromFile
VisualBasicScript.vb (1)
27Return Script.CreateInitialScript(Of T)(VisualBasicScriptCompiler.Instance, SourceText.From(If(code, String.Empty)), options, globalsType, assemblyLoader)
VisualBasicScriptCompiler.vb (2)
44Private Shared Function GetGlobalImportsForCompilation(script As Script) As IEnumerable(Of GlobalImport) 50Public Overrides Function CreateSubmission(script As Script) As Compilation