| クラス | 解説 | |
|---|---|---|
![]() | Expression | -------------------------------------------------------------------- Expression -------------------------------------------------------------------- a tree containing a parsed expression e.g. Expression expr = scriptEngine.Parse(strExpression); object val = expr.Evaluate(); -------------------------------------------------------------------- |
![]() | ExpressionInfo | Contains extended information about parsed expression. |
![]() | ParmExpression | |
![]() | ReportScriptContext | Extends the ReportScriptContextBase class to recognizing the following custom objects: - database fields of C1.Report.FlexReport - report objects (fields, sections, groups) - custom variables: Page |
![]() | ReportScriptContextBase | Base class for all script contexts in the report, implements the caching of objects requested via GetObjectByName(...). |
![]() | Script | Provides information about called script |
![]() | ScriptEngine | -------------------------------------------------------------------- ScriptEngine -------------------------------------------------------------------- ScriptEngine parses strings and returns Expression or Statement objects that can be evaluated/executed. The base class provides only simple expression evaluation. For most practical applications, you will need to add variables and custom objects to the engine, so scripts can assign values etc. To do this, you should derive a new class from ScriptEngine and override the following member: public virtual object GetObjectByName(string strName) This function should return an object. The object can be a simple value type (e.g. "pi" returns 3.14), or an object with properties and methods (e.g. myobj.Left). To allow getting and setting the default property, the object must implement a property called "Value" (e.g. myobj = 12 is the same as myobj.Value = 12). This class has two main members: - ParseExpression(str) returns an Expression object that can be evaluated very quickly. This returns a value (object type). - ParseStatement(str) returns a Statement object that can be executed. This does not return anything. It also has two useful helpers: - Evaluate(str) parses the expression in str and evaluates it. - Execute(str) parses the statement in str and executes it. These helpers are convenient, but calling them repeatedly is slower than using the ParseExpression/ParseStatement and evaluating/executing the results (because the latter only parses once). |
![]() | ScriptEngineContext | Represents the context in which script executed. |
![]() | Statement | -------------------------------------------------------------------- Statement -------------------------------------------------------------------- a sequence of parsed statements e.g. Statement stmt = scriptEngine.ParseStatemnt(strStatemtent); stmt.Execute(); -------------------------------------------------------------------- |
![]() | UserExpression |


