FsiEvaluationSession Type
Represents an F# Interactive evaluation session.
Instance members
Instance member |
Description
|
Full Usage:
this.AddBoundValue
Parameters:
string
value : obj
|
Creates a root-level value with the given name and .NET object. If the .NET object contains types from assemblies that are not referenced in the interactive session, it will try to implicitly resolve them by default configuration. Name must be a valid identifier.
|
|
Get a handle to the resolved view of the current signature of the incrementally generated assembly.
|
|
Get all the dynamically generated assemblies
|
Full Usage:
this.EvalExpression
Parameters:
string
scriptFileName : string
Returns: FsiValue option
|
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'.
|
Full Usage:
this.EvalExpressionNonThrowing
Parameters:
string
scriptFileName : string
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. 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.
|
Full Usage:
this.EvalExpressionNonThrowing
Parameters:
string
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. 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'.
|
Full Usage:
this.EvalScript
Parameters:
string
|
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'.
|
Full Usage:
this.FormatValue
Parameters:
obj
reflectionType : Type
Returns: string
|
Format a value to a string using the current PrintDepth, PrintLength etc settings provided by the active fsi configuration object
|
|
Gets the root-level values that are bound to an identifier
|
Full Usage:
this.GetCompletions
Parameters:
string
Returns: string seq
|
A host calls this to get the completions for a long identifier, e.g. in the console Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered by input from 'stdin'.
|
|
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. |
Full Usage:
this.IsGui
Returns: bool
|
A host calls this to determine if the --gui parameter is active
|
Full Usage:
this.LCID
Returns: int option
|
A host calls this to get the active language ID if provided by fsi-server-lcid
|
Full Usage:
this.ParseAndCheckInteraction
Parameters:
string
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. Operations may be run concurrently with other requests to the InteractiveChecker.
|
Full Usage:
this.PartialAssemblySignatureUpdated
Returns: IEvent<unit>
|
Raised when an interaction is successfully typechecked and executed, resulting in an update to the type checking state. This event is triggered after parsing and checking, either via input from 'stdin', or via a call to EvalInteraction.
|
Full Usage:
this.ReportUnhandledException
Parameters:
exn
|
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
|
|
Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`.
|
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:
obj
useFsiAuxLib : bool
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.
|