Class IronPythonBinding
- Namespace
- TimeCockpit.Data.DataModel.Actions
- Assembly
- TimeCockpit.Data.dll
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.
public class IronPythonBinding : SourceCodeBinding, IDynamicMetaObjectProvider, INotifyPropertyChanged
- Inheritance
-
ObjectIronPythonBinding
- Implements
-
IDynamicMetaObjectProviderINotifyPropertyChanged
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
Constructors
IronPythonBinding()
public IronPythonBinding()
Methods
Clone()
clones the model action.
public override ModelActionBinding Clone()
Returns
- ModelActionBinding
Returns a deep copy of the iron python binding.
Execute(ExecutionContext)
Calls an executable piece of code that is associated with the IronPythonBinding.
protected override void Execute(ExecutionContext context)
Parameters
contextExecutionContextThe ExecutionContext in which to execute the source code.
ExecuteScript(DataContext, ExecutionInfo, String, Object)
Executes an IronPython script.
public static string ExecuteScript(DataContext dataContext, ExecutionInfo sourceCode, string parameterName, object parameter)
Parameters
dataContextDataContextThe data context to use.
sourceCodeExecutionInfoThe source code to use.
parameterNameStringThe name of the paramter of the function.
parameterObjectThe parameter to pass to the function
Returns
- String
Returns the output of the script.
GetDirectives()
Gets all directives that are specified in the IronPython code.
public Dictionary<string, string> GetDirectives()
Returns
- Dictionary<String, String>
Retruns a dictionary of directives.
Examples
#IncludeClause .Include('APP_Customer')
VerifySourceCode(ExecutionInfo, String)
Verifies the IronPython source code.
public static string VerifySourceCode(ExecutionInfo script, string parameterName)
Parameters
scriptExecutionInfoThe source code to verify.
parameterNameStringThe name of the paramter of the function.
Returns
- String
Returns the name of the function.