Click or drag to resize

Script Class



A class that represents a script that you can run. Create a script using a language specific script class such as CSharpScript or VisualBasicScript.
Inheritance Hierarchy

Namespace:  Microsoft.CodeAnalysis.Scripting
Assembly:  Microsoft.CodeAnalysis.Scripting (in Microsoft.CodeAnalysis.Scripting.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public abstract class Script

The Script type exposes the following members.

Properties
  NameDescription
Public propertyCode
The source code of the script.
Public propertyGlobalsType
The type of an object whose members can be accessed by the script as global variables.
Public propertyOptions
The options used by this script.
Public propertyPrevious
A script that will run first when this script is run. Any declarations made in the previous script can be referenced in this script. The end state from running this script includes all declarations made by both scripts.
Public propertyReturnType
The expected return type of the script.
Top
Methods
  NameDescription
Public methodCompile
Forces the script through the compilation step. If not called directly, the compilation step will occur on the first call to Run.
Public methodContinueWith(Stream, ScriptOptions)
Continues the script with given Stream representing code.
Public methodContinueWith(String, ScriptOptions)
Continues the script with given code snippet.
Public methodContinueWithTResult(Stream, ScriptOptions)
Continues the script with given Stream representing code.
Public methodContinueWithTResult(String, ScriptOptions)
Continues the script with given code snippet.
Public methodGetCompilation
Get's the Compilation that represents the semantics of the script.
Public methodRunAsync(Void, ScriptState)
Public methodRunAsync(Void, ScriptState, Object)
Public methodRunFromAsync(Void, ScriptState)
Public methodRunFromAsync(Void, ScriptState, ScriptState)
Public methodWithOptions
Creates a new version of this script with the specified options.
Top
See Also