ScriptLoader Class

Class for loading, compiling and executing MIKE 1D scripts

Definition

Namespace: DHI.Mike1D.Plugins
Assembly: DHI.Mike1D.Mike1DDataAccess (in DHI.Mike1D.Mike1DDataAccess.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public class ScriptLoader
Inheritance
Object    ScriptLoader

Constructors

ScriptLoader Create script loader

Properties

AdditionalDependencies Additional user defined dependencies, separated by ; (semi-colon)
Assemblies List of assemblies corresponding to different sript IDs ScriptIds.
Count Number of script classes found
Dependencies Default dependencies for MIKE 1D engine
IncludeDebugInformation Include debug information in script, to support debugging of script code
ScriptIds IDs of different scripts.

Methods

AddAssembly Add an assembly corresponding to a script ID.
AddCustomParameters Add custom parameters to method invocation parameters.
AllDependencies All dependencies, joining Dependencies and AdditionalDependencies
CheckParameters Check that the input arguments to the scripting methods are matching the specified input types.
CompileFromSource(FilePath) Compile script from source file
CompileFromSource(String, String) Compile script from string source (stored in DB or similar)
CompileFromSources Compile script from string sources (stored in DB or similar)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Execute Handle list of input arguments for script methods and execture them.
ExecuteMethodsT Execute script methods.
ExecuteScriptMethod Execute script method
ExpandAdditionalDependencies In case the AdditionalDependencies contains "macro" definitions, i.e. starts with one of "$(Setup)", "$(Engine)" or "$(Exe)", these are expanded to full paths.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindScripts(ListType) Find script methods in compiled script assembly
FindScripts(String, Assembly, ListType) Find script methods in compiled script assembly
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetTypeMethods Get list of methods for a specific type of argument.
HandleScriptFile Handle scripts in .cs file.
HandleScriptInfos Handle scripts stored as list of ScriptInfos
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnControllerCreated Method to assign to the ControllerCreatedEvent.
SetCustomScriptParameters Set Script parameters on the form: scriptParameters = "par1=value1;par2=value2;"
SetupScriptParameters Setup script parameters and additional data.
ToStringReturns a string that represents the current object.
(Inherited from Object)
ValidateScriptMethods Validate script methods.
ValidateScriptMethods(ListListType) Validate script methods and its arguments.

Fields

_diagnostics Diagnostics object, for reporting errors.
_types Types (classes) that are to be instantiated.
CustomParameters Values for method parameters, read from the command line

See Also