Class IronPythonBinding
Represents a SourceCodeBinding that establishes a relationship from a ModelAction to executable code that is directly stored with the binding. The binding references some executable python code.
Inheritance
Implements
Inherited Members
Namespace: TimeCockpit.Data.DataModel.Actions
Assembly: TimeCockpit.Data.dll
Syntax
public class IronPythonBinding : SourceCodeBinding, IDynamicMetaObjectProvider, INotifyPropertyChanged
Constructors
IronPythonBinding()
Declaration
public IronPythonBinding()
Methods
Clone()
clones the model action.
Declaration
public override ModelActionBinding Clone()
Returns
Type | Description |
---|---|
ModelActionBinding | Returns a deep copy of the iron python binding. |
Overrides
Execute(ExecutionContext)
Calls an executable piece of code that is associated with the IronPythonBinding.
Declaration
protected override void Execute(ExecutionContext context)
Parameters
Type | Name | Description |
---|---|---|
ExecutionContext | context | The ExecutionContext in which to execute the source code. |
Overrides
ExecuteScript(DataContext, ExecutionInfo, String, Object)
Executes an IronPython script.
Declaration
public static string ExecuteScript(DataContext dataContext, ExecutionInfo sourceCode, string parameterName, object parameter)
Parameters
Type | Name | Description |
---|---|---|
DataContext | dataContext | The data context to use. |
ExecutionInfo | sourceCode | The source code to use. |
System.String | parameterName | The name of the paramter of the function. |
System.Object | parameter | The parameter to pass to the function |
Returns
Type | Description |
---|---|
System.String | Returns the output of the script. |
GetDirectives()
Gets all directives that are specified in the IronPython code.
Declaration
public Dictionary<string, string> GetDirectives()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | Retruns a dictionary of directives. |
Examples
IncludeClause .Include('APP_Customer')
VerifySourceCode(ExecutionInfo, String)
Verifies the IronPython source code.
Declaration
public static string VerifySourceCode(ExecutionInfo script, string parameterName)
Parameters
Type | Name | Description |
---|---|---|
ExecutionInfo | script | The source code to verify. |
System.String | parameterName | The name of the paramter of the function. |
Returns
Type | Description |
---|---|
System.String | Returns the name of the function. |