This project has moved. For the latest updates, please go here.

WorkMode

WorkMode is a property of ScriptRunningMachine to indicate what features to be available in ReoScript module. Below is the items of WorkMode:
  • AllowDirectAccess - Allows script to access .Net object directly, such as getting or setting propery value, calling methods and binding events. (default is disable, See DirectAccess)
  • AutoImportRelationType - Allows ReoScript to auto-import the related types that may used in other imported type. (default is enable)
  • AllowCLREventBind - Allows to auto-bind CLR event. This option works only AllowDirectAccess. (default is disable, See Event Binding)
  • IgnoreCLRExceptions - Ignore all exceptions that may caused in .Net calling. If this mode is disabled the script executing will be terminated when exception is thrown. (default is enable)
  • AutoUppercaseWhenCLRCalling - Auto convert first letter of member name to uppercase during call CLR members.

Enable WorkMode

ScriptRunningMachine srm = new ScriptRunningMachine();
srm.WorkMode |= MachineWorkMode.AllowDirectAccess | MachineWorkMode.AllowCLREventBind;

Disable WorkMode

srm.WorkMode &= ~(MachineWorkMode.AllowCLREventBind);

Reset WorkMode

srm.WorkMode = MachineWorkMode.Default;


Last edited Jan 17, 2014 at 1:22 PM by unvell, version 3