Microsoft.Scripting
Class that represents compiler options.
Note that this class is likely to change when hosting API becomes part of .Net
This overload will be called when a SourceUnit is not available. This can happen if the code is being executed remotely,
since SourceUnit cannot be marshaled across AppDomains.
Hosting API counterpart for .
Engine that compiled this code.
Default scope for this code.
Executes code in a default scope.
Execute code within a given scope and returns the result.
Executes code in in a default scope and converts to a given type.
Execute code within a given scope and converts result to a given type.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the code in the specified scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions)
or if an exception serialization loses information.
Executes the expression in the specified scope and return a result.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions)
or if an exception serialization loses information.
Provides documentation against live objects for use in a REPL window.
Gets the available members defined on the provided object.
Gets the overloads available for the provided object if it is invokable.
Gets the available members on the provided remote object.
Gets the overloads available for the provided remote object if it is invokable.
The host can use this class to track for errors reported during script parsing and compilation.
Hosting API counterpart for .
Bridges ErrorSink and ErrorListener.
Errors reported by language compilers to ErrorSink are forwarded to the ErrorListener provided by the host.
This proxy is created in the scenario when the compiler is processing a single SourceUnit.
Therefore it could maintain one to one mapping from SourceUnit to ScriptSource.
In a case, which shouldn't happen, that the compiler reports an error in a different SourceUnit we just create
a new instance of the ScriptSource each time.
TODO: Consider compilation of multiple source units and creating a hashtable mapping SourceUnits to ScriptSources
within the context of compilation unit.
Bridges ErrorListener and ErrorSink. It provides the reverse functionality as ErrorSinkProxyListener
Stores information needed to setup a language
Creates a new LanguageSetup
assembly qualified type name of the language
provider
Creates a new LanguageSetup with the provided options
TODO: remove this overload?
Creates a new LanguageSetup with the provided options
Gets an option as a strongly typed value.
The assembly qualified type name of the language provider
Display name of the language. If empty, it will be set to the first
name in the Names list.
Case-insensitive language names.
Case-insensitive file extension, optionally starts with a dot.
Option names are case-sensitive.
Provides documentation about a member in a live object.
The name of the member
The kind of the member if it's known.
Specifies the type of member.
ObjectOperations provide a large catalogue of object operations such as member access, conversions,
indexing, and things like addition. There are several introspection and tool support services available
for more advanced hosts.
You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics
of the operations. There is a default instance of ObjectOperations you can share across all uses of the
engine. However, very advanced hosts can create new instances.
Returns true if the object can be called, false if it cannot.
Even if an object is callable Call may still fail if an incorrect number of arguments or type of arguments are provided.
Invokes the provided object with the given parameters and returns the result.
The prefered way of calling objects is to convert the object to a strongly typed delegate
using the ConvertTo methods and then invoking that delegate.
Invokes a member on the provided object with the given parameters and returns the result.
Creates a new instance from the provided object using the given parameters, and returns the result.
Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only.
Gets the member name from the object obj and converts it to the type T. Throws an exception if the
member does not exist, is write-only, or cannot be converted.
Gets the member name from the object obj. Returns true if the member is successfully retrieved and
stores the value in the value out param.
Returns true if the object has a member named name, false if the member does not exist.
Removes the member name from the object obj.
Sets the member name on object obj to value.
Sets the member name on object obj to value. This overload can be used to avoid
boxing and casting of strongly typed members.
Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only.
Gets the member name from the object obj and converts it to the type T. Throws an exception if the
member does not exist, is write-only, or cannot be converted.
Gets the member name from the object obj. Returns true if the member is successfully retrieved and
stores the value in the value out param.
Returns true if the object has a member named name, false if the member does not exist.
Removes the member name from the object obj.
Sets the member name on object obj to value.
Sets the member name on object obj to value. This overload can be used to avoid
boxing and casting of strongly typed members.
Converts the object obj to the type T. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the object obj to the type type. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot.
The conversion will be explicit or implicit depending on what the langauge prefers.
Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot.
The conversion will be explicit or implicit depending on what the langauge prefers.
Converts the object obj to the type T including explicit conversions which may lose information.
Converts the object obj to the type type including explicit conversions which may lose information.
Converts the object obj to the type T including explicit conversions which may lose information.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type type including explicit conversions which may lose information.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type T including implicit conversions.
Converts the object obj to the type type including implicit conversions.
Converts the object obj to the type T including implicit conversions.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type type including implicit conversions.
Returns true if the value can be converted, false if it cannot.
Performs a generic unary operation on the specified target and returns the result.
Performs a generic unary operation on the strongly typed target and returns the value as the specified type
Performs the generic binary operation on the specified targets and returns the result.
Peforms the generic binary operation on the specified strongly typed targets and returns
the strongly typed result.
Performs addition on the specified targets and returns the result. Throws an exception
if the operation cannot be performed.
Performs subtraction on the specified targets and returns the result. Throws an exception
if the operation cannot be performed.
Raises the first object to the power of the second object. Throws an exception
if the operation cannot be performed.
Multiplies the two objects. Throws an exception
if the operation cannot be performed.
Divides the first object by the second object. Throws an exception
if the operation cannot be performed.
Performs modulus of the 1st object by the second object. Throws an exception
if the operation cannot be performed.
Shifts the left object left by the right object. Throws an exception if the
operation cannot be performed.
Shifts the left object right by the right object. Throws an exception if the
operation cannot be performed.
Performs a bitwise-and of the two operands. Throws an exception if the operation
cannot be performed.
Performs a bitwise-or of the two operands. Throws an exception if the operation
cannot be performed.
Performs a exclusive-or of the two operands. Throws an exception if the operation
cannot be performed.
Compares the two objects and returns true if the left object is less than the right object.
Throws an exception if hte comparison cannot be performed.
Compares the two objects and returns true if the left object is greater than the right object.
Throws an exception if hte comparison cannot be performed.
Compares the two objects and returns true if the left object is less than or equal to the right object.
Throws an exception if hte comparison cannot be performed.
Compares the two objects and returns true if the left object is greater than or equal to the right object.
Throws an exception if hte comparison cannot be performed.
Compares the two objects and returns true if the left object is equal to the right object.
Throws an exception if the comparison cannot be performed.
Compares the two objects and returns true if the left object is not equal to the right object.
Throws an exception if hte comparison cannot be performed.
Returns a string which describes the object as it appears in source code
Returns a string representation of the object in a language specific object display format.
Returns a list of strings which contain the known members of the object.
Returns a string providing documentation for the specified object.
Returns a list of signatures applicable for calling the specified object in a form displayable to the user.
Returns true if the remote object is callable.
Invokes the specified remote object with the specified remote parameters.
Though delegates are preferable for calls they may not always be usable for remote objects.
Invokes the specified remote object with the local parameters which will be serialized
to the remote app domain.
Creates a new remote instance from the provided remote object using the given parameters, and returns the result.
Creates a new remote instance from the provided remote object using the given parameters, and returns the result.
Sets the remote object as a member on the provided remote object.
Sets the member name on the remote object obj to value. This overload can be used to avoid
boxing and casting of strongly typed members.
Gets the member name on the remote object. Throws an exception if the member is not defined or
is write-only.
Gets the member name on the remote object. Throws an exception if the member is not defined or
is write-only.
Gets the member name on the remote object. Returns false if the member is not defined or
is write-only.
Tests to see if the member name is defined on the remote object.
Removes the member from the remote object
Converts the remote object into the specified type returning a handle to
the new remote object. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the remote object into the specified type returning a handle to
the new remote object. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the remote object into the specified type returning a handle to
the new remote object. Returns true if the value can be converted,
false if it cannot. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the remote object into the specified type returning a handle to
the new remote object. Returns true if the value can be converted,
false if it cannot. The conversion will be explicit or implicit depending on
what the langauge prefers.
Converts the object obj to the type T including explicit conversions which may lose information.
Converts the object obj to the type type including explicit conversions which may lose information.
Converts the object obj to the type T including explicit conversions which may lose information.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type type including explicit conversions which may lose information.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type T including implicit conversions.
Converts the object obj to the type type including implicit conversions.
Converts the object obj to the type T including implicit conversions.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type type including implicit conversions.
Returns true if the value can be converted, false if it cannot.
Unwraps the remote object and converts it into the specified type before
returning it.
Performs the specified unary operator on the remote object.
Performs the specified binary operator on the remote object.
Adds the two remote objects. Throws an exception if the operation cannot be performed.
Subtracts the 1st remote object from the second. Throws an exception if the operation cannot be performed.
Raises the 1st remote object to the power of the 2nd. Throws an exception if the operation cannot be performed.
Multiplies the two remote objects. Throws an exception if the operation cannot be performed.
Divides the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed.
Performs modulus on the 1st remote object by the 2nd. Throws an exception if the operation cannot be performed.
Shifts the 1st remote object left by the 2nd remote object. Throws an exception if the operation cannot be performed.
Shifts the 1st remote object right by the 2nd remote object. Throws an exception if the operation cannot be performed.
Performs bitwise-and on the two remote objects. Throws an exception if the operation cannot be performed.
Performs bitwise-or on the two remote objects. Throws an exception if the operation cannot be performed.
Performs exclusive-or on the two remote objects. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is less than the 2nd. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is greater than the 2nd. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is less than or equal to the 2nd. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is greater than or equal to than the 2nd. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is equal to the 2nd. Throws an exception if the operation cannot be performed.
Compares the two remote objects and returns true if the 1st is not equal to the 2nd. Throws an exception if the operation cannot be performed.
Returns a string representation of the object in a langauge specific object display format.
Returns a list of strings which contain the known members of the remote object.
Returns a string providing documentation for the specified remote object.
Returns a list of signatures applicable for calling the specified object in a form displayable to the user.
Helper to unwrap an object - in the future maybe we should validate the current app domain.
Helper to unwrap multiple objects
Provides documentation for a single overload of an invokable object.
The name of the invokable object.
The documentation for the overload or null if no documentation is available.
The parameters for the invokable object.
Information about the return value.
Provides documentation for a single parameter.
The name of the parameter
The type name of the parameter or null if no type information is available.
Provides addition information about the parameter such as if it's a parameter array.
Gets the documentation string for this parameter or null if no documentation is available.
Indications extra information about a parameter such as if it's a parameter array.
Advanced APIs for HAPI providers. These methods should not be used by hosts.
They are provided for other hosting API implementers that would like to leverage existing HAPI and
extend it with language specific functionality, for example.
is a null reference.
is remote.
e is a null reference.
is remote.
is a null reference.
is remote.
is a null reference.
is remote.
is a null reference.
is remote.
is a null reference.
is remote.
is a null reference.
is a null reference.
is a transparent proxy.
Performs a callback in the ScriptEngine's app domain and returns the result.
Creates a new DocumentationOperations object from the given DocumentationProvider.
Represents a language in Hosting API.
Hosting API counterpart for .
Returns a default ObjectOperations for the engine.
Because an ObjectOperations object caches rules for the types of
objects and operations it processes, using the default ObjectOperations for
many objects could degrade the caching benefits. Eventually the cache for
some operations could degrade to a point where ObjectOperations stops caching and
does a full search for an implementation of the requested operation for the given objects.
Another reason to create a new ObjectOperations instance is to have it bound
to the specific view of a ScriptScope. Languages may attach per-language
behavior to a ScriptScope which would alter how the operations are performed.
For simple hosting situations, this is sufficient behavior.
Returns a new ObjectOperations object. See the Operations property for why you might want to call this.
Returns a new ObjectOperations object that inherits any semantics particular to the provided ScriptScope.
See the Operations property for why you might want to call this.
Executes an expression. The execution is not bound to any particular scope.
The engine doesn't support code execution.
is a null reference.
Executes an expression within the specified scope.
The engine doesn't support code execution.
is a null reference.
is a null reference.
Executes an expression within a new scope and converts result to the given type.
The engine doesn't support code execution.
is a null reference.
Executes an expression within the specified scope and converts result to the given type.
The engine doesn't support code execution.
is a null reference.
is a null reference.
Executes content of the specified file in a new scope and returns that scope.
The engine doesn't support code execution.
is a null reference.
Executes content of the specified file against the given scope.
The .
The engine doesn't support code execution.
is a null reference.
is a null reference.
Executes the expression in the specified scope and return a result.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the expression in the specified scope and return a result.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization
loses information that you need to access.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API in case the exception is not serializable (for example, due to security restrictions) or its serialization
loses information that you need to access.
Creates a new ScriptScope using the default storage container
Creates a new ScriptScope whose storage contains the provided dictionary of objects
Accesses to the ScriptScope will turn into get,set, and delete members against this dictionary
Creates a new ScriptScope whose storage is an arbitrary object.
Accesses to the ScriptScope will turn into get, set, and delete members against the object.
This method returns the ScriptScope in which a ScriptSource of given path was executed.
The ScriptSource.Path property is the key to finding the ScriptScope. Hosts need
to make sure they create a ScriptSource and set its Path property appropriately.
GetScope is primarily useful for tools that need to map files to their execution scopes. For example,
an editor and interpreter tool might run a file Foo that imports or requires a file Bar.
The editor's user might later open the file Bar and want to execute expressions in its context.
The tool would need to find Bar's ScriptScope for setting the appropriate context in its interpreter window.
This method helps with this scenario.
Return a ScriptSource object from string contents with the current engine as the language binding.
The default SourceCodeKind is AutoDetect.
The ScriptSource's Path property defaults to null.
Return a ScriptSource object from string contents with the current engine as the language binding.
The ScriptSource's Path property defaults to null.
Return a ScriptSource object from string contents with the current engine as the language binding.
The default SourceCodeKind is AutoDetect.
Return a ScriptSource object from string contents. These are helpers for creating ScriptSources' with the right language binding.
Return a ScriptSource object from file contents with the current engine as the language binding.
The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions
or map to this language engine with ScriptRuntime.GetEngineByFileExtension.
The default SourceCodeKind is File.
The ScriptSource's Path property will be the path argument.
The encoding defaults to System.Text.Encoding.Default.
Return a ScriptSource object from file contents with the current engine as the language binding.
The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions
or map to this language engine with ScriptRuntime.GetEngineByFileExtension.
The default SourceCodeKind is File.
The ScriptSource's Path property will be the path argument.
Return a ScriptSource object from file contents with the current engine as the language binding.
The path's extension does NOT have to be in ScriptRuntime.GetRegisteredFileExtensions
or map to this language engine with ScriptRuntime.GetEngineByFileExtension.
The ScriptSource's Path property will be the path argument.
This method returns a ScriptSource object from a System.CodeDom.CodeObject.
This is a factory method for creating a ScriptSources with this language binding.
The expected CodeDom support is extremely minimal for syntax-independent expression of semantics.
Languages may do more, but hosts should only expect CodeMemberMethod support,
and only sub nodes consisting of the following:
CodeSnippetStatement
CodeSnippetExpression
CodePrimitiveExpression
CodeMethodInvokeExpression
CodeExpressionStatement (for holding MethodInvoke)
This method returns a ScriptSource object from a System.CodeDom.CodeObject.
This is a factory method for creating a ScriptSources with this language binding.
The expected CodeDom support is extremely minimal for syntax-independent expression of semantics.
Languages may do more, but hosts should only expect CodeMemberMethod support,
and only sub nodes consisting of the following:
CodeSnippetStatement
CodeSnippetExpression
CodePrimitiveExpression
CodeMethodInvokeExpression
CodeExpressionStatement (for holding MethodInvoke)
This method returns a ScriptSource object from a System.CodeDom.CodeObject.
This is a factory method for creating a ScriptSources with this language binding.
The expected CodeDom support is extremely minimal for syntax-independent expression of semantics.
Languages may do more, but hosts should only expect CodeMemberMethod support,
and only sub nodes consisting of the following:
CodeSnippetStatement
CodeSnippetExpression
CodePrimitiveExpression
CodeMethodInvokeExpression
CodeExpressionStatement (for holding MethodInvoke)
This method returns a ScriptSource object from a System.CodeDom.CodeObject.
This is a factory method for creating a ScriptSources with this language binding.
The expected CodeDom support is extremely minimal for syntax-independent expression of semantics.
Languages may do more, but hosts should only expect CodeMemberMethod support,
and only sub nodes consisting of the following:
CodeSnippetStatement
CodeSnippetExpression
CodePrimitiveExpression
CodeMethodInvokeExpression
CodeExpressionStatement (for holding MethodInvoke)
These methods return ScriptSource objects from stream contents with the current engine as the language binding.
The default SourceCodeKind is File.
The encoding defaults to Encoding.Default.
These methods return ScriptSource objects from stream contents with the current engine as the language binding.
The default SourceCodeKind is File.
These methods return ScriptSource objects from stream contents with the current engine as the language binding.
The encoding defaults to Encoding.Default.
This method returns a ScriptSource with the content provider supplied with the current engine as the language binding.
This helper lets you own the content provider so that you can implement a stream over internal host data structures, such as an editor's text representation.
This method returns a language-specific service.
It provides a point of extensibility for a language implementation
to offer more functionality than the standard engine members discussed here.
Commonly available services include:
TokenCategorizer
Provides standardized tokenization of source code
ExceptionOperations
Provides formatting of exception objects.
DocumentationProvidera
Provides documentation for live object.
This property returns readon-only LanguageOptions this engine is using.
The values are determined during runtime initialization and read-only afterwards.
You can change the settings via a configuration file or explicitly using ScriptRuntimeSetup class.
This property returns the ScriptRuntime for the context in which this engine executes.
This property returns the engine's version as a string. The format is language-dependent.
Sets the search paths used by the engine for loading files when a script wants
to import or require another file of code.
The language doesn't allow to set search paths.
Gets the search paths used by the engine for loading files when a script wants
to import or require another file of code.
ScriptHost is collocated with ScriptRuntime in the same app-domain.
The host can implement a derived class to consume some notifications and/or
customize operations like TryGetSourceUnit,ResolveSourceUnit, etc.
The areguments to the the constructor of the derived class are specified in ScriptRuntimeSetup
instance that enters ScriptRuntime initialization.
If the host is remote with respect to DLR (i.e. also with respect to ScriptHost)
and needs to access objects living in its app-domain it can pass MarshalByRefObject
as an argument to its ScriptHost subclass constructor.
The runtime the host is attached to.
Invoked after the initialization of the associated Runtime is finished.
The host can override this method to perform additional initialization of runtime (like loading assemblies etc.).
Invoked after a new language is loaded into the Runtime.
The host can override this method to perform additional initialization of language engines.
Provides hosting to DLR. Forwards DLR requests to the ScriptHost.
Provides host-redirectable IO streams used by DLR languages for default IO.
Used if the host stores the output as binary data.
Binary stream to write data to.
Encoding used to convert textual data written to the output by the script.
Used if the host handles both kinds of data (textual and binary) by itself.
Represents a Dynamic Language Runtime in Hosting API.
Hosting API counterpart for .
Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings.
Creates an instance of host class specified in the setup and associates it with the created runtime.
Both Runtime and ScriptHost are collocated in the current app-domain.
Creates a new runtime with languages set up according to the current application configuration
(using System.Configuration).
Creates ScriptRuntime in the current app-domain and initialized according to the the specified settings.
Creates an instance of host class specified in the setup and associates it with the created runtime.
Both Runtime and ScriptHost are collocated in the specified app-domain.
Gets engine for the specified language.
Looks up the engine for the specified language. If the engine hasn't been created in this Runtime, it is instantiated here.
The method doesn't lock nor send notifications to the host.
path is empty, contains one or more of the invalid characters defined in GetInvalidPathChars or doesn't have an extension.
path is null
file extension does not map to language engine
language does not have any search paths
file does exist in language's search path
This property returns the "global object" or name bindings of the ScriptRuntime as a ScriptScope.
You can set the globals scope, which you might do if you created a ScriptScope with an
IAttributesCollection so that your host could late bind names.
This method walks the assembly's namespaces and name bindings to ScriptRuntime.Globals
to represent the types available in the assembly. Each top-level namespace name gets
bound in Globals to a dynamic object representing the namespace. Within each top-level
namespace object, nested namespace names are bound to dynamic objects representing each
tier of nested namespaces. When this method encounters the same namespace-qualified name,
it merges names together objects representing the namespaces.
Stores information needed to setup a ScriptRuntime
The list of language setup information for languages to load into
the runtime
Indicates that the script runtime is in debug mode.
This means:
1) Symbols are emitted for debuggable methods (methods associated with SourceUnit).
2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging).
3) JIT optimization is disabled for all methods
4) Languages may disable optimizations based on this value.
Ignore CLR visibility checks
Can be any derived class of ScriptHost. When set, it allows the
host to override certain methods to control behavior of the runtime
Option names are case-sensitive.
Arguments passed to the host type when it is constructed
Reads setup from .NET configuration system (.config files).
If there is no configuration available returns an empty setup.
Reads setup from a specified XML stream.
Reads setup from a specified XML file.
A ScriptScope is a unit of execution for code. It consists of a global Scope which
all code executes in. A ScriptScope can have an arbitrary initializer and arbitrary
reloader.
ScriptScope is not thread safe. Host should either lock when multiple threads could
access the same module or should make a copy for each thread.
Hosting API counterpart for .
Gets an engine for the language associated with this scope.
Returns invariant engine if the scope is language agnostic.
Gets a value stored in the scope under the given name.
The specified name is not defined in the scope.
is a null reference.
Gets a value stored in the scope under the given name.
Converts the result to the specified type using the conversion that the language associated with the scope defines.
If no language is associated with the scope, the default CLR conversion is attempted.
The specified name is not defined in the scope.
is a null reference.
Tries to get a value stored in the scope under the given name.
is a null reference.
Tries to get a value stored in the scope under the given name.
Converts the result to the specified type using the conversion that the language associated with the scope defines.
If no language is associated with the scope, the default CLR conversion is attempted.
is a null reference.
Sets the name to the specified value.
is a null reference.
Gets a handle for a value stored in the scope under the given name.
The specified name is not defined in the scope.
is a null reference.
Tries to get a handle for a value stored in the scope under the given name.
Returns true if there is such name, false otherwise.
is a null reference.
Sets the name to the specified value.
The value held by the handle isn't from the scope's app-domain and isn't serializable or MarshalByRefObject.
or is a null reference.
Determines if this context or any outer scope contains the defined name.
is a null reference.
Removes the variable of the given name from this scope.
true if the value existed in the scope before it has been removed.
is a null reference.
Gets a list of variable names stored in the scope.
Gets an array of variable names and their values stored in the scope.
Hosting counterpart for .
Identification of the source unit. Assigned by the host.
The format and semantics is host dependent (could be a path on file system or URL).
null for anonymous script source.
Cannot be an empty string.
Compile the ScriptSource into CompileCode object that can be executed
repeatedly in its default scope or in other scopes without having to recompile the code.
Code cannot be compiled.
Errors are reported to the specified listener.
Returns null if the parser cannot compile the code due to errors.
Errors are reported to the specified listener.
Returns null if the parser cannot compile the code due to error(s).
Errors are reported to the specified listener.
Returns null if the parser cannot compile the code due to error(s).
Executes the code in the specified scope.
Returns an object that is the resulting value of running the code.
When the ScriptSource is a file or statement, the engine decides what is
an appropriate value to return. Some languages return the value produced
by the last expression or statement, but languages that are not expression
based may return null.
Code cannot be compiled.
Executes the source code. The execution is not bound to any particular scope.
Executes the code in a specified scope and converts the result to the specified type.
The conversion is language specific.
Executes the code in an empty scope and converts the result to the specified type.
The conversion is language specific.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the code in the specified scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
Executes the code in an empty scope.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions)
or if an exception serialization loses information.
Executes the expression in the specified scope and return a result.
Returns an ObjectHandle wrapping the resulting value of running the code.
If an exception is thrown the exception is caught and an ObjectHandle to
the exception is provided.
Use this API to handle non-serializable exceptions (exceptions might not be serializable due to security restrictions)
or if an exception serialization loses information.
Runs a specified code as if it was a program launched from OS command shell.
and returns a process exit code indicating the success or error condition
of executing the code.
Exact behavior depends on the language. Some languages have a dedicated "exit" exception that
carries the exit code, in which case the exception is cought and the exit code is returned.
The default behavior returns the result of program's execution converted to an integer
using a language specific conversion.
Code cannot be compiled.
Detects the encoding of the content.
An encoding that is used by the reader of the script source to transcode its content to Unicode text.
Null if the content is already textual and no transcoding is performed.
Note that the default encoding specified when the script source is created could be overridden by
an encoding that is found in the content preamble (Unicode BOM or a language specific encoding preamble).
In that case the preamble encoding is returned. Otherwise, the default encoding is returned.
An I/O error occurs.
Reads specified range of lines (or less) from the source unit.
1-based number of the first line to fetch.
The number of lines to fetch.
Which character sequences are considered line separators is language specific.
If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators.
An I/O error occurs.
Reads a specified line.
1-based line number.
Line content. Line separator is not included.
An I/O error occurs.
Which character sequences are considered line separators is language specific.
If language doesn't specify otherwise "\r", "\n", "\r\n" are recognized line separators.
Gets script source content.
Entire content.
An I/O error occurs.
The result includes language specific preambles (e.g. "#coding:UTF-8" encoding preamble recognized by Ruby),
but not the preamble defined by the content encoding (e.g. BOM).
The entire content of the source unit is encoded by single encoding (if it is read from binary stream).
The current internal state of the scanner.
The current startLocation of the scanner.
Move the tokenizer past the next token and return its category.
The token information associated with the token just scanned.
Move the tokenizer past the next token.
False if the end of stream has been reached, true otherwise.
Get all tokens over a block of the stream.
The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token
should be returned.
s
Tokens are read until at least given amount of characters is read or the stream ends.
A enumeration of tokens.
Scan from startLocation to at least startLocation + length.
Tokens are read until at least given amount of characters is read or the stream ends.
This method is used to determine state at arbitrary startLocation.
False if the end of stream has been reached, true otherwise.
This structure represents an immutable integer interval that describes a range of values, from Start to End.
It is closed on the left and open on the right: [Start .. End).
Dynamically choose between interpreting, simple compilation and compilation
that takes advantage of runtime history.
The number of iterations before the interpreter starts compiling.s
Display exception detail (callstack) when exception gets caught
Whether to gather performance statistics.
Initial file search paths provided by the host.
Reads an option whose value is expected to be a collection of non-null strings.
Reaturns a read-only copy of the option's value.
Abstracts system operations that are used by DLR and could potentially be platform specific.
The host can implement its PAL to adapt DLR to the platform it is running on.
For example, the Silverlight host adapts some file operations to work against files on the server.
Invalid path.
Invalid path.
Represents a language context. Typically there is at most 1 context
associated with each language, but some languages may use more than one context
to identify code that should be treated differently. Contexts are used during
member and operator lookup.
Registers a language within the system with the specified name.
Looks up the context ID for the specified context identifier
Singleton for each language.
Must not be called under a lock as it can potentially call a user code.
The language context's implementation failed to instantiate.
Gets a value indicating whether the application is in debug mode.
This means:
1) Symbols are emitted for debuggable methods (methods associated with SourceUnit).
2) Debuggable methods are emitted to non-collectable types (this is due to CLR limitations on dynamic method debugging).
3) JIT optimization is disabled for all methods
4) Languages may disable optimizations based on this value.
Ignore CLR visibility checks.
Provides language specific documentation for live objects.
ObjectOperations provide a large catalogue of object operations such as member access, conversions,
indexing, and things like addition. There are several introspection and tool support services available
for more advanced hosts.
You get ObjectOperation instances from ScriptEngine, and they are bound to their engines for the semantics
of the operations. There is a default instance of ObjectOperations you can share across all uses of the
engine. However, very advanced hosts can create new instances.
a dictionary of SiteKey's which are used to cache frequently used operations, logically a set
the # of sites we had created at the last cleanup
the total number of sites we've ever created
the number of sites required before we'll try cleaning up the cache...
the minimum difference between the average that is required to remove
the maximum number we'll remove on a single cache cleanup
the number of sites we should clear after if we can't make progress cleaning up otherwise
Calls the provided object with the given parameters and returns the result.
The prefered way of calling objects is to convert the object to a strongly typed delegate
using the ConvertTo methods and then invoking that delegate.
Invokes a member on the provided object with the given parameters and returns the result.
Invokes a member on the provided object with the given parameters and returns the result.
Creates a new instance from the provided object using the given parameters, and returns the result.
Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only.
Gets the member name from the object obj and converts it to the type T. Throws an exception if the
member does not exist, is write-only, or cannot be converted.
Gets the member name from the object obj. Returns true if the member is successfully retrieved and
stores the value in the value out param.
Returns true if the object has a member named name, false if the member does not exist.
Removes the member name from the object obj.
Sets the member name on object obj to value.
Sets the member name on object obj to value. This overload can be used to avoid
boxing and casting of strongly typed members.
Gets the member name from the object obj. Throws an exception if the member does not exist or is write-only.
Gets the member name from the object obj and converts it to the type T. The conversion will be explicit or implicit
depending on what the langauge prefers. Throws an exception if the member does not exist, is write-only, or cannot be converted.
Gets the member name from the object obj. Returns true if the member is successfully retrieved and
stores the value in the value out param.
Returns true if the object has a member named name, false if the member does not exist.
Removes the member name from the object obj. Returns true if the member was successfully removed
or false if the member does not exist.
Sets the member name on object obj to value.
Sets the member name on object obj to value. This overload can be used to avoid
boxing and casting of strongly typed members.
Converts the object obj to the type T. The conversion will be explicit or implicit
depending on what the langauge prefers.
Converts the object obj to the type type. The conversion will be explicit or implicit
depending on what the langauge prefers.
Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot.
The conversion will be explicit or implicit depending on what the langauge prefers.
Converts the object obj to the type type. Returns true if the value can be converted, false if it cannot.
The conversion will be explicit or implicit depending on what the langauge prefers.
Convers the object obj to the type T including explicit conversions which may lose information.
Converts the object obj to the type type including explicit conversions which may lose information.
Converts the object obj to the type type including explicit conversions which may lose information.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot.
Convers the object obj to the type T including implicit conversions.
Converts the object obj to the type type including implicit conversions.
Converts the object obj to the type type including implicit conversions.
Returns true if the value can be converted, false if it cannot.
Converts the object obj to the type T. Returns true if the value can be converted, false if it cannot.
Performs a generic unary operation on the strongly typed target and returns the value as the specified type
Peforms the generic binary operation on the specified strongly typed targets and returns
the strongly typed result.
Returns a list of strings which contain the known members of the object.
Returns a string representation of the object in a language specific object display format.
Gets or creates a dynamic site w/ the specified type parameters for the provided binder.
This will either get the site from the cache or create a new site and return it. The cache
may be cleaned if it's gotten too big since the last usage.
Gets or creates a dynamic site w/ the specified type parameters for the provided binder.
This will either get the site from the cache or create a new site and return it. The cache
may be cleaned if it's gotten too big since the last usage.
Gets or creates a dynamic site w/ the specified type parameters for the provided binder.
This will either get the site from the cache or create a new site and return it. The cache
may be cleaned if it's gotten too big since the last usage.
Gets or creates a dynamic site w/ the specified type parameters for the provided binder.
This will either get the site from the cache or create a new site and return it. The cache
may be cleaned if it's gotten too big since the last usage.
Gets or creates a dynamic site w/ the specified type parameters for the provided binder.
This will either get the site from the cache or create a new site and return it. The cache
may be cleaned if it's gotten too big since the last usage.
Helper to create to get or create the dynamic site - called by the GetSite methods.
Removes items from the cache that have the lowest usage...
Helper class for tracking all of our unique dynamic sites and their
usage patterns. We hash on the combination of the binder and site type.
We also track the hit count and the key holds the site associated w/ the
key. Logically this is a set based upon the binder and site-type but we
store it in a dictionary.
DLR requires any Hosting API provider to implement this class and provide its instance upon Runtime initialization.
DLR calls on it to perform basic host/system dependent operations.
Abstracts system operations that are used by DLR and could potentially be platform specific.
Helper for storing information about stack frames.
Singleton LanguageContext which represents a language-neutral LanguageContext
Internal class which binds a LanguageContext, StreamContentProvider, and Encoding together to produce
a TextContentProvider which reads binary data with the correct language semantics.
Provides language specific facilities which are typically called by the runtime.
Provides the ContextId which includes members that should only be shown for this LanguageContext.
ContextId's are used for filtering by Scope's.
Gets the ScriptDomainManager that this LanguageContext is running within.
Whether the language can parse code and create source units.
Gets the scope associated with a file, or null if none was available
Creates a new ScriptScope using the default storage container
Creates a new ScriptScope whose storage contains the provided dictionary of objects
Accesses to the ScriptScope will turn into get,set, and delete members against this dictionary
Creates a new ScriptScope whose storage is an arbitrary object.
Accesses to the ScriptScope will turn into get, set, and delete members against the object.
Provides access to setting variables in scopes.
By default this goes through ObjectOperations which can be rather slow.
Languages can override this to provide fast customized access which avoids
ObjectOperations. Languages can provide fast access to commonly used scope
types for that language. Typically this includes ScopeStorage and any other
classes which the language themselves uses for backing of a Scope.
Provides access to try getting variables in scopes.
By default this goes through ObjectOperations which can be rather slow.
Languages can override this to provide fast customized access which avoids
ObjectOperations. Languages can provide fast access to commonly used scope
types for that language. Typically this includes ScopeStorage and any other
classes which the language themselves uses for backing of a Scope.
Provides access to getting variables in scopes and converting the result.
By default this goes through ObjectOperations which can be rather slow.
Languages can override this to provide fast customized access which avoids
ObjectOperations. Languages can provide fast access to commonly used scope
types for that language. Typically this includes ScopeStorage and any other
classes which the language themselves uses for backing of a Scope.
Provides access to getting variables in scopes.
By default this goes through ObjectOperations which can be rather slow.
Languages can override this to provide fast customized access which avoids
ObjectOperations. Languages can provide fast access to commonly used scope
types for that language. Typically this includes ScopeStorage and any other
classes which the language themselves uses for backing of a Scope.
Provides a text reader for source code that is to be read from a given stream.
The stream open for reading. The stream must also allow seeking.
An encoding that should be used if the stream doesn't have Unicode or language specific preamble.
the path of the source unit if available
The reader.
An I/O error occurs.
Creates the language specific CompilerOptions object for compilation of code not bound to any particular scope.
The language should flow any relevant options from LanguageContext to the newly created options instance.
Creates the language specific CompilerOptions object for compilation of code bound to a given scope.
Parses the source code within a specified compiler context.
The source unit to parse is held on by the context.
null on failure.
Could also set the code properties and line/file mappings on the source unit.
Creates a conversion binder.
If explicitCast is true then the binder should do explicit conversions.
If explicitCast is false then the binder should do implicit conversions.
If explicitCast is null it is up to the language to select the conversions
which closest match their normal behavior.
Gets the member names associated with the object
By default, only returns IDO names
Returns a string representation of the object in a language specific object display format.
Dynamic sites container that could be used for any dynamic dispatches necessary for formatting.
Object to format.
A string representation of object.
This attribute marks a parameter that is not allowed to be null.
It is used by the method binding infrastructure to generate better error
messages and method selection.
This attribute marks a parameter whose type is an array that is not allowed to have null items.
It is used by the method binding infrastructure to generate better error
messages and method selection.
Wraps a an IDictionary[object, object] and exposes it as an IDynamicMetaObjectProvider so that
users can access string attributes using member accesses.
Represents a host-provided variables for executable code. The variables are
typically backed by a host-provided dictionary. Languages can also associate per-language
information with the context by using scope extensions. This can be used for tracking
state which is used across multiple executions, for providing custom forms of
storage (for example object keyed access), or other language specific semantics.
Scope objects are thread-safe as long as their underlying storage is thread safe.
Script hosts can choose to use thread safe or thread unsafe modules but must be sure
to constrain the code they right to be single-threaded if using thread unsafe
storage.
Creates a new scope with a new empty thread-safe dictionary.
Creates a new scope which is backed by an arbitrary object for it's storage.
Gets the ScopeExtension associated with the provided ContextId.
Sets the ScopeExtension to the provided value for the given ContextId.
The extension can only be set once. The returned value is either the new ScopeExtension
if no value was previously set or the previous value.
Gets or sets a collection of environment variables.
Event for when a host calls LoadAssembly. After hooking this
event languages will need to call GetLoadedAssemblyList to
get any assemblies which were loaded before the language was
loaded.
Only host should redirect I/O.
Exposes a IDictionary[string, object] as a dynamic object. Gets/sets/deletes turn
into accesses on the underlying dictionary.
The current internal state of the scanner.
The current startLocation of the scanner.
Move the tokenizer past the next token and return its category.
The token information associated with the token just scanned.
Move the tokenizer past the next token.
False if the end of stream has been reached, true otherwise.
Get all tokens over a block of the stream.
The scanner should return full tokens. If startLocation + length lands in the middle of a token, the full token
should be returned.
Tokens are read until at least given amount of characters is read or the stream ends.
A enumeration of tokens.
Scan from startLocation to at least startLocation + length.
The mininum number of characters to process while getting tokens.
This method is used to determine state at arbitrary startLocation.
False if the end of stream has been reached, true otherwise.
This attribute is used to mark a parameter that can accept any keyword parameters that
are not bound to normal arguments. The extra keyword parameters will be
passed in a dictionary which is created for the call.
Most languages which support params dictionaries will support the following types:
IDictionary<string, anything>
IDictionary<object, anything>
Dictionary<string, anything>
Dictionary<object, anything>
IDictionary
IAttributesCollection (deprecated)
For languages which don't have language level support the user will be required to
create and populate the dictionary by hand.
This attribute is the dictionary equivalent of the System.ParamArrayAttribute.
public static void KeywordArgFunction([ParamsDictionary]IDictionary<string, object> dict) {
foreach (var v in dict) {
Console.WriteLine("Key: {0} Value: {1}", v.Key, v.Value);
}
}
Called from Python:
KeywordArgFunction(a = 2, b = "abc")
will print:
Key: a Value = 2
Key: b Value = abc
Provides optimized and cacheable support for scope storage.
This is the default object used for storing values in a scope.
The implementation uses a case-insensitive dictionary which holds
onto ScopeVariableIgnoreCase objects. The SVIC's hold onto ScopeVariable
objects for each possible casing.
Gets the named value from the scope optionally ignoring case.
If the named value is not present an InvalidOperationException is raised.
Attempts to get the named value from the scope optionally ignoring the case.
Returns true if the value is present, false if it is not.
Sets the named value in the scope optionally ignoring the case.
Deletes the named value from the scope optionally ignoring the case.
Checks if the named value is present in the scope optionally ignoring the case.
Gets the IScopeVariable for the scope optionally ignoring case.
The IScopeVariable can be held onto and get/set/deleted without performing
a dictionary lookup on subsequent accesses.
Gets the ScopeVariable for the scope in a case-sensitive manner.
The ScopeVariable can be held onto and get/set/deleted without performing
a dictionary lookup on subsequent accesses.
Gets the ScopeVariableIgnoreCase for the scope in a case-insensitive manner.
The ScopeVariable can be held onto and get/set/deleted without performing
a dictionary lookup on subsequent accesses.
Provides convenient case-sensitive value access.
Returns all of the member names which currently have values in the scope.
The list contains all available casings.
Returns all of the member names and their associated values from the scope.
The list contains all available casings.
Provides a common interface for accessing both case sensitive and
case insensitive variable storage.
True if the scope has a value, false if it does not.
Atempts to get the value. If a value is assigned it returns true otherwise
it returns false.
Sets the current value in the scope.
Removes the current value from the scope.
Boxes the value for storage in a scope. Languages or consumers of the scope
can save this value and use it to get/set the current value in the scope for
commonly accessed values.
ScopeVariables are case sensitive and will only refer to a single value.
True if the scope has a value, false if it does not.
Atempts to get the value. If a value is assigned it returns true otherwise
it returns false.
Sets the current value in the scope.
Removes the current value from the scope.
Boxes the value for storage in a scope. Languages or consumers of the scope
can save this value and use it to get/set the current value in the scope for
commonly accessed values.
ScopeVariablesIgnoreCase are case insensitive and may access different casings
depending on how other gets/sets occur in the scope.
True if the scope has a value, false if it does not.
Atempts to get the value. If a value is assigned it returns true otherwise
it returns false.
Sets the current value in the scope.
Removes the current value from the scope.
ScriptCode is an instance of compiled code that is bound to a specific LanguageContext
but not a specific ScriptScope. The code can be re-executed multiple times in different
scopes. Hosting API counterpart for this class is CompiledCode.
Provides a factory to create streams over one source of binary content.
StreamContentProvider's are used when opening a file of an unknown encoding. The
StreamContentProvider will be wrapped in a TextContentProvider provided by the language
which can support a language specific way of interpreting the binary data into text.
For example some languages allow a marker at the beginning of the file which specifies
the encoding of the rest of the file.
Creates a new Stream which is backed by the content the StreamContentProvider was created for.
For example if the StreamContentProvider was backing a file then GetStream re-opens the file and returns
the new stream.
This method may be called multiple times. For example once to compile the code and again to get
the source code to display error messages.
See also Microsoft.VisualStudio.Package.TokenTriggers.
Source code is a syntactically correct.
Source code represents an empty statement/expression.
Source code is already invalid and no suffix can make it syntactically correct.
Last token is incomplete. Source code can still be completed correctly.
Last statement is incomplete. Source code can still be completed correctly.
Defines a kind of the source code. The parser sets its initial state accordingly.
The code is an expression.
The code is a sequence of statements.
The code is a single statement.
The code is a content of a file.
The code is an interactive command.
The language parser auto-detects the kind. A syntax error is reported if it is not able to do so.
Converts a generic ICollection of T into an array of T.
If the collection is already an array of T the original collection is returned.
Wraps the provided enumerable into a ReadOnlyCollection{T}
Copies all of the data into a new array, so the data can't be
changed after creation. The exception is if the enumerable is
already a ReadOnlyCollection{T}, in which case we just return it.
Console input stream (Console.OpenStandardInput) has a bug that manifests itself if reading small amounts of data.
This class wraps the standard input stream with a buffer that ensures that enough data are read from the underlying stream.
Requires the range [offset, offset + count] to be a subset of [0, array.Count].
Offset or count are out of range.
Requires the range [offset, offset + count] to be a subset of [0, array.Count].
Offset or count are out of range.
Requires the array and all its items to be non-null.
Requires the enumerable collection and all its items to be non-null.
Requires the range [offset, offset + count] to be a subset of [0, array.Count].
Array is null.
Offset or count are out of range.
Emits an object delegate(CallSite, object * paramCount, object) that's suitable for use in a non-strongly typed call site.
Use this helper only for delegates with more parameters than Func has.
Source code reader.
Gets the encoding that is used by the reader to convert binary data read from an underlying binary stream.
Null if the reader is reading from a textual source (not performing any byte to character transcoding).
Seeks the first character of a specified line in the text stream.
Line number. The current position is assumed to be line #1.
Returns true if the line is found, false otherwise.
Provides a StreamContentProvider for a stream of content backed by a file on disk.
Represents a location in source code.
Creates a new source location.
The index in the source stream the location represents (0-based).
The line in the source stream the location represents (1-based).
The column in the source stream the location represents (1-based).
The index in the source stream the location represents (0-based).
The line in the source stream the location represents (1-based).
The column in the source stream the location represents (1-based).
Compares two specified location values to see if they are equal.
One location to compare.
The other location to compare.
True if the locations are the same, False otherwise.
Compares two specified location values to see if they are not equal.
One location to compare.
The other location to compare.
True if the locations are not the same, False otherwise.
Compares two specified location values to see if one is before the other.
One location to compare.
The other location to compare.
True if the first location is before the other location, False otherwise.
Compares two specified location values to see if one is after the other.
One location to compare.
The other location to compare.
True if the first location is after the other location, False otherwise.
Compares two specified location values to see if one is before or the same as the other.
One location to compare.
The other location to compare.
True if the first location is before or the same as the other location, False otherwise.
Compares two specified location values to see if one is after or the same as the other.
One location to compare.
The other location to compare.
True if the first location is after or the same as the other location, False otherwise.
Compares two specified location values.
One location to compare.
The other location to compare.
0 if the locations are equal, -1 if the left one is less than the right one, 1 otherwise.
A location that is valid but represents no location at all.
An invalid location.
A minimal valid location.
Whether the location is a valid location.
True if the location is valid, False otherwise.
Stores the location of a span of text in a source file.
Constructs a new span with a specific start and end location.
The beginning of the span.
The end of the span.
The start location of the span.
The end location of the span. Location of the first character behind the span.
Length of the span (number of characters inside the span).
A valid span that represents no location.
An invalid span.
Whether the locations in the span are valid.
Compares two specified Span values to see if they are equal.
One span to compare.
The other span to compare.
True if the spans are the same, False otherwise.
Compares two specified Span values to see if they are not equal.
One span to compare.
The other span to compare.
True if the spans are not the same, False otherwise.
Identification of the source unit. Assigned by the host.
The format and semantics is host dependent (could be a path on file system or URL).
Empty string for anonymous source units.
LanguageContext of the language of the unit.
Reads specified range of lines (or less) from the source unit.
Line numbers starts with 1.
Errors are reported to the specified sink.
Returns null if the parser cannot compile the code due to error(s).
Executes against a specified scope.
Executes against a specified scope and reports errors to the given error sink.
Executes in a new scope created by the language.
Executes in a new scope created by the language.
Executes in a new scope created by the language.
Unmapped span.
Provides a factory to create TextReader's over one source of textual content.
TextContentProvider's are used when reading from a source which is already decoded
or has a known specific decoding.
For example a text editor might provide a TextContentProvider whose backing is
an in-memory text buffer that the user can actively edit.
Creates a new TextReader which is backed by the content the TextContentProvider was created for.
This method may be called multiple times. For example once to compile the code and again to get
the source code to display error messages.
A token marking an end of stream.
A space, tab, or newline.
A block comment.
A single line comment.
A documentation comment.
A numeric literal.
A character literal.
A string literal.
A regular expression literal.
A keyword.
A directive (e.g. #line).
A punctuation character that has a specific meaning in a language.
A token that operates as a separator between two language elements.
An identifier (variable, $variable, @variable, @@variable, $variable$, function!, function?, [variable], i'variable', ...)
Braces, parenthesis, brackets.
Errors.
Strongly-typed and parameterized string factory.
A string like "Cannot access member {1} declared on type {0} because the type contains generic parameters."
A string like "Type '{0}' is missing or cannot be loaded."
A string like "static property "{0}" of "{1}" can only be read through a type, not an instance"
A string like "static property "{0}" of "{1}" can only be assigned to through a type, not an instance"
A string like "Method precondition violated"
A string like "Invalid argument value"
A string like "Non-empty string required"
A string like "Non-empty collection required"
A string like "must by an Exception instance"
A string like "Type of test must be bool"
A string like "Type of the expression must be bool"
A string like "Empty string is not a valid path."
A string like "Invalid delegate type (Invoke method not found)."
A string like "expected only static property"
A string like "Property doesn't exist on the provided type"
A string like "Field doesn't exist on provided type"
A string like "Type doesn't have constructor with a given signature"
A string like "Type doesn't have a method with a given name."
A string like "Type doesn't have a method with a given name and signature."
A string like "Count must be non-negative."
A string like "arrayType must be an array type"
A string like "Either code or target must be specified."
A string like "Type parameter is {0}. Expected a delegate."
A string like "Cannot cast from type '{0}' to type '{1}"
A string like "unknown member type: '{0}'. "
A string like "RuleBuilder can only be used with delegates whose first argument is CallSite."
A string like "no instance for call."
A string like "Missing Test."
A string like "Missing Target."
A string like "The operation requires a non-generic type for {0}, but this represents generic types only"
A string like "Invalid operation: '{0}'"
A string like "Finally already defined."
A string like "Can not have fault and finally."
A string like "Fault already defined."
A string like "Cannot create default value for type {0}."
A string like "Unhandled convert: {0}"
A string like "{0}.{1} has no publiclly visible method."
A string like "Global/top-level local variable names must be unique."
A string like "Generating code from non-serializable CallSiteBinder."
A string like "Specified path is invalid."
A string like "Dictionaries are not hashable."
A string like "language already registered."
A string like "The method or operation is not implemented."
A string like "No exception."
A string like "Extension type {0} must be public."
A string like "Already initialized."
A string like "CreateScopeExtension must return a scope extension."
A string like "Invalid number of parameters for the service."
A string like "Invalid type of argument {0}; expecting {1}."
A string like "Cannot change non-caching value."
A string like "Field {0} is read-only"
A string like "Property {0} is read-only"
A string like "Expected event from {0}.{1}, got event from {2}.{3}."
A string like "expected bound event, got {0}."
A string like "Expected type {0}, got {1}."
A string like "can only write to member {0}."
A string like "No code to compile."
A string like "Invalid stream type: {0}."
A string like "Queue empty."
A string like "Enumeration has not started. Call MoveNext."
A string like "Enumeration already finished."
A string like "can't add another casing for identifier {0}"
A string like "can't add new identifier {0}"
A string like "Type '{0}' doesn't provide a suitable public constructor or its implementation is faulty: {1}"
A string like "Invalid output directory."
A string like "Invalid assembly name or file extension."
A string like "Cannot emit constant {0} ({1})"
A string like "No implicit cast from {0} to {1}"
A string like "No explicit cast from {0} to {1}"
A string like "name '{0}' not defined"
A string like "No default value for a given type."
A string like "Specified language provider type is not registered."
A string like "can't read from property"
A string like "can't write to property"
A string like "Cannot create instance of {0} because it contains generic parameters"
A string like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n"
Strongly-typed and parameterized exception factory.
ArgumentException with message like "Either code or target must be specified."
InvalidOperationException with message like "Type parameter is {0}. Expected a delegate."
InvalidOperationException with message like "Cannot cast from type '{0}' to type '{1}"
InvalidOperationException with message like "unknown member type: '{0}'. "
InvalidOperationException with message like "RuleBuilder can only be used with delegates whose first argument is CallSite."
InvalidOperationException with message like "no instance for call."
InvalidOperationException with message like "Missing Test."
InvalidOperationException with message like "Missing Target."
TypeLoadException with message like "The operation requires a non-generic type for {0}, but this represents generic types only"
ArgumentException with message like "Invalid operation: '{0}'"
InvalidOperationException with message like "Finally already defined."
InvalidOperationException with message like "Can not have fault and finally."
InvalidOperationException with message like "Fault already defined."
ArgumentException with message like "Cannot create default value for type {0}."
ArgumentException with message like "Unhandled convert: {0}"
InvalidOperationException with message like "{0}.{1} has no publiclly visible method."
ArgumentException with message like "Global/top-level local variable names must be unique."
ArgumentException with message like "Generating code from non-serializable CallSiteBinder."
ArgumentException with message like "Specified path is invalid."
ArgumentTypeException with message like "Dictionaries are not hashable."
InvalidOperationException with message like "language already registered."
NotImplementedException with message like "The method or operation is not implemented."
InvalidOperationException with message like "No exception."
ArgumentException with message like "Extension type {0} must be public."
InvalidOperationException with message like "Already initialized."
InvalidImplementationException with message like "CreateScopeExtension must return a scope extension."
ArgumentException with message like "Invalid number of parameters for the service."
ArgumentException with message like "Invalid type of argument {0}; expecting {1}."
ArgumentException with message like "Cannot change non-caching value."
MissingMemberException with message like "Field {0} is read-only"
MissingMemberException with message like "Property {0} is read-only"
ArgumentException with message like "Expected event from {0}.{1}, got event from {2}.{3}."
ArgumentTypeException with message like "expected bound event, got {0}."
ArgumentTypeException with message like "Expected type {0}, got {1}."
MemberAccessException with message like "can only write to member {0}."
InvalidOperationException with message like "No code to compile."
ArgumentException with message like "Invalid stream type: {0}."
InvalidOperationException with message like "Queue empty."
InvalidOperationException with message like "Enumeration has not started. Call MoveNext."
InvalidOperationException with message like "Enumeration already finished."
InvalidOperationException with message like "can't add another casing for identifier {0}"
InvalidOperationException with message like "can't add new identifier {0}"
ArgumentException with message like "Invalid output directory."
ArgumentException with message like "Invalid assembly name or file extension."
ArgumentException with message like "Cannot emit constant {0} ({1})"
ArgumentException with message like "No implicit cast from {0} to {1}"
ArgumentException with message like "No explicit cast from {0} to {1}"
MissingMemberException with message like "name '{0}' not defined"
ArgumentException with message like "No default value for a given type."
ArgumentException with message like "Specified language provider type is not registered."
InvalidOperationException with message like "can't read from property"
InvalidOperationException with message like "can't write to property"
ArgumentException with message like "Cannot create instance of {0} because it contains generic parameters"
System.Security.VerificationException with message like "Non-verifiable assembly generated: {0}:\nAssembly preserved as {1}\nError text:\n{2}\n"