ScriptHost

Constructors

ConstructorDescription
new()
Signature: unit -> ScriptHost

Static members

Static memberDescription
ScriptHost.Create(...)
Signature: (opts:FsiOptions * fsiObj:obj option * reportGlobal:bool option * outWriter:TextWriter option * fsiOutWriter:TextWriter option * errWriter:TextWriter option * fsiErrWriter:TextWriter option * preventStdOut:bool option) -> IFsiSession

Create a new IFsiSession by specifying all fsi arguments manually.

ScriptHost.CreateForwardWriter(...)
Signature: (f:(string -> unit) * revertRedirect:bool option * removeNewLines:bool option) -> TextWriter

Creates a forwarder Textwriter, which forwards all output to the given function. Set revertRedirect only to "false" if you know that f doesn't print anything to the stdout. When revertRedirect is true we capture the Console.Out property and set it before calling f. removeNewLines handles the newline characters properly and calls f for every new line instead of every call to to the underlaying writers. The difference is that with removeNewLines you should use printfn and get lines without newline characters. On the other hand without removeNewLines you are called on every TextWriter.Write call, so you might be called multiple times for a single lines or a single time for multiple lines.

ScriptHost.CreateNew(...)
Signature: (defines:string list option * fsiObj:obj option * reportGlobal:bool option * outWriter:TextWriter option * fsiOutWriter:TextWriter option * errWriter:TextWriter option * fsiErrWriter:TextWriter option * preventStdOut:bool option) -> IFsiSession

Quickly create a new IFsiSession with some sane defaults