Table of Contents

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
Object
IronPythonBinding
Implements
IDynamicMetaObjectProvider
INotifyPropertyChanged
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

context ExecutionContext

The 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

dataContext DataContext

The data context to use.

sourceCode ExecutionInfo

The source code to use.

parameterName String

The name of the paramter of the function.

parameter Object

The 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

script ExecutionInfo

The source code to verify.

parameterName String

The name of the paramter of the function.

Returns

String

Returns the name of the function.