FsiEvaluationSession Type
Represents an F# Interactive evaluation session.
Instance members
| Instance member |
Description
|
|
|
|
Get a handle to the resolved view of the current signature of the incrementally generated assembly.
|
|
Get all the dynamically generated assemblies
|
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed synchronously on the 'main' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'. The scriptFileName parameter is used to report errors including this file name. |
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed synchronously on the 'main' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors and warnings are collected apart from any exception arising from execution which is returned via a Choice. Parsing is performed on the current thread, and execution is performed synchronously on the 'main' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'. The scriptFileName parameter is used to report errors including this file name.
|
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors and warnings are collected apart from any exception arising from execution which is returned via a Choice. Parsing is performed on the current thread, and execution is performed synchronously on the 'main' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
Full Usage:
this.EvalInteraction
Parameters:
string
scriptFileName : string
?cancellationToken : CancellationToken
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors are sent to the output writer, a 'true' return value indicates there were no errors overall. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'. The scriptFileName parameter is used to report errors including this file name.
|
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors are sent to the output writer, a 'true' return value indicates there were no errors overall. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
Full Usage:
this.EvalInteractionNonThrowing
Parameters:
string
scriptFileName : string
?cancellationToken : CancellationToken
Returns: Choice<FsiValue option, exn> * FSharpDiagnostic[]
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors and warnings are collected apart from any exception arising from execution which is returned via a Choice. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'. The scriptFileName parameter is used to report errors including this file name.
|
Full Usage:
this.EvalInteractionNonThrowing
Parameters:
string
?cancellationToken : CancellationToken
Returns: Choice<FsiValue option, exn> * FSharpDiagnostic[]
|
Execute the code as if it had been entered as one or more interactions, with an implicit termination at the end of the input. Stop on first error, discarding the rest of the input. Errors and warnings are collected apart from any exception arising from execution which is returned via a Choice. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
|
Execute the given script. Stop on first error, discarding the rest of the script. Errors are sent to the output writer, a 'true' return value indicates there were no errors overall. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
Full Usage:
this.EvalScriptNonThrowing
Parameters:
string
Returns: Choice<unit, exn> * FSharpDiagnostic[]
|
Execute the given script. Stop on first error, discarding the rest of the script. Errors and warnings are collected apart from any exception arising from execution which is returned via a Choice. Execution is performed on the 'Run()' thread. Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
|
|
|
Gets the root-level values that are bound to an identifier
|
|
|
|
The single, global interactive checker to use in conjunction with other operations on the FsiEvaluationSession. If you are using an FsiEvaluationSession in this process, you should only use this InteractiveChecker for additional checking operations.
|
Full Usage:
this.Interrupt
|
A host calls this to request an interrupt on the evaluation thread. |
|
A host calls this to determine if the --gui parameter is active
|
A host calls this to get the active language ID if provided by fsi-server-lcid
|
|
Full Usage:
this.ParseAndCheckInteraction
Parameters:
string
-
Source code of the interaction to check.
?keepAssemblyContents : bool
-
Keep the checked contents of the interaction.
Returns: FSharpParseFileResults * FSharpCheckFileResults * FSharpCheckProjectResults
|
Typecheck the given script fragment in the type checking context implied by the current state of F# Interactive. The results can be used to access intellisense, perform resolutions, check brace matching and other information. Accessing assembly contents need 'keepAssemblyContents' set to 'true'. Operations may be run concurrently with other requests to the InteractiveChecker. |
|
|
|
A host calls this to report an unhandled exception in a standard way, e.g. an exception on the GUI thread gets printed to stderr
|
Full Usage:
this.Run
|
Load the dummy interaction, load the initial files, and,
if interacting, start the background thread to read the standard input.
Performs these steps:
- Load the dummy interaction, if any
- Set up exception handling, if any
- Load the initial files, if any
- Start the background thread to read the standard input, if any
- Sit in the GUI event loop indefinitely, if needed
|
|
Tries to find a root-level value that is bound to the given identifier
|
|
Static members
| Static member |
Description
|
Full Usage:
FsiEvaluationSession.Create(fsiConfig, argv, inReader, outWriter, errorWriter, ?collectible, ?legacyReferenceResolver)
Parameters:
FsiEvaluationSessionHostConfig
-
The dynamic configuration of the evaluation session
argv : string[]
-
The command line arguments for the evaluation session
inReader : TextReader
-
Read input from the given reader
outWriter : TextWriter
-
Write output to the given writer
errorWriter : TextWriter
-
Write errors to the given writer
?collectible : bool
-
Optionally make the dynamic assembly for the session collectible
?legacyReferenceResolver : LegacyReferenceResolver
-
An optional resolver for legacy MSBuild references
Returns: FsiEvaluationSession
|
Create an FsiEvaluationSession, reading from the given text input, writing to the given text output and error writers
|
|
Get a configuration that uses a private inbuilt implementation of the 'fsi' object and does not implicitly reference FSharp.Compiler.Interactive.Settings.dll.
|
Full Usage:
FsiEvaluationSession.GetDefaultConfiguration(fsiObj)
Parameters:
obj
Returns: FsiEvaluationSessionHostConfig
|
Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, an object from another DLL with identical characteristics) to provide an implementation of the configuration. FSharp.Compiler.Interactive.Settings.dll is referenced by default.
|
Full Usage:
FsiEvaluationSession.GetDefaultConfiguration(fsiObj, useFsiAuxLib)
Parameters: Returns: FsiEvaluationSessionHostConfig
|
Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, an object from another DLL with identical characteristics) to provide an implementation of the configuration. The flag indicates if FSharp.Compiler.Interactive.Settings.dll is referenced by default.
|
F# Compiler Guide