C# Class Mono.CSharp.InteractiveBase

The default base class for every interaction line
The expressions and statements behave as if they were a static method of this class. The InteractiveBase class contains a number of useful methods, but can be overwritten by setting the InteractiveBaseType property in the Evaluator
显示文件 Open project: praeclarum/runcs

Public Properties

Property Type Description
ContinuationPrompt string
Error System.IO.TextWriter
Evaluator Evaluator
Output System.IO.TextWriter
Prompt string
QuitRequested bool

Public Methods

Method Description
Describe ( object x ) : string

Describes an object or a type.

This method will show a textual representation of the object's type. If the object is a System.Type it renders the type directly, otherwise it renders the type returned by invoking GetType on the object.

LoadAssembly ( string assembly ) : void

Loads the assembly

Loads the specified assembly and makes its types available to the evaluator. This is equivalent to passing the -pkg: command line flag to the C# compiler on the command line.

LoadPackage ( string pkg ) : void

Loads the assemblies from a package

Loads the assemblies from a package. This is equivalent to passing the -pkg: command line flag to the C# compiler on the command line.

ShowUsing ( ) : void

Displays the using statements in effect at this point.

ShowVars ( ) : void

Shows all the variables defined so far.

Time ( System.Action a ) : System.TimeSpan

Times the execution of the given delegate

print ( string obj ) : void

Method Details

Describe() public static method

Describes an object or a type.
This method will show a textual representation of the object's type. If the object is a System.Type it renders the type directly, otherwise it renders the type returned by invoking GetType on the object.
public static Describe ( object x ) : string
x object
return string

LoadAssembly() public static method

Loads the assembly
Loads the specified assembly and makes its types available to the evaluator. This is equivalent to passing the -pkg: command line flag to the C# compiler on the command line.
public static LoadAssembly ( string assembly ) : void
assembly string
return void

LoadPackage() public static method

Loads the assemblies from a package
Loads the assemblies from a package. This is equivalent to passing the -pkg: command line flag to the C# compiler on the command line.
public static LoadPackage ( string pkg ) : void
pkg string
return void

ShowUsing() public static method

Displays the using statements in effect at this point.
public static ShowUsing ( ) : void
return void

ShowVars() public static method

Shows all the variables defined so far.
public static ShowVars ( ) : void
return void

Time() public static method

Times the execution of the given delegate
public static Time ( System.Action a ) : System.TimeSpan
a System.Action
return System.TimeSpan

print() public static method

public static print ( string obj ) : void
obj string
return void

Property Details

ContinuationPrompt public_oe static_oe property

The secondary prompt used for interactive use (used when an expression is incomplete).
public static string ContinuationPrompt
return string

Error public_oe static_oe property

Determines where the standard error of methods in this class will go.
public static TextWriter,System.IO Error
return System.IO.TextWriter

Evaluator public_oe static_oe property

public static Evaluator,Mono.CSharp Evaluator
return Evaluator

Output public_oe static_oe property

Determines where the standard output of methods in this class will go.
public static TextWriter,System.IO Output
return System.IO.TextWriter

Prompt public_oe static_oe property

The primary prompt used for interactive use.
public static string Prompt
return string

QuitRequested public_oe static_oe property

Used to signal that the user has invoked the `quit' statement.
public static bool QuitRequested
return bool