Class ActivityFlowContext

Represents context of the whole execution of an activity flow. It contains all properties used all along the execution

Inheritance
System.Object
ActivityFlowContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Engine
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class ActivityFlowContext

Constructors

ActivityFlowContext()

Initializes a new instance of the ActivityFlowContext class.

Declaration
public ActivityFlowContext()

ActivityFlowContext(Dictionary<String, Object>)

Initializes a new instance of the ActivityFlowContext class. The properties dictionary is passed as a parameter.

Declaration
public ActivityFlowContext(Dictionary<string, object> properties)
Parameters
Type Name Description
System.Collections.Generic.Dictionary<System.String, System.Object> properties

The properties dictionary

Fields

Properties

Gets properties dictionary of activity flow.

Declaration
public readonly Dictionary<string, object> Properties
Field Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.Object>

Methods

GetDefaultGeneric<T>()

Gets default value of a generic type.

Declaration
public T GetDefaultGeneric<T>()
Returns
Type Description
T

The default value of type.

Type Parameters
Name Description
T

The generic type.

GetValue<T>(String)

Gets value of an activity flow's property.

Declaration
public T GetValue<T>(string name)
Parameters
Type Name Description
System.String name

Name of the property.

Returns
Type Description
T

Value of the property.

Type Parameters
Name Description
T

Type of the property.

Register(String, Type, Type)

Registers the property as the context property if it does not exist, and returns the property value.

Declaration
public object Register(string name, Type type, Type modelType)
Parameters
Type Name Description
System.String name

The property name.

System.Type type

The property type.

System.Type modelType

The model type, which is used to identify what ActivityFlow/Activity is registering property.

Returns
Type Description
System.Object

The registered property value.

SetValue(String, Object)

Sets value of an activity flow's property.

Declaration
public void SetValue(string name, object value)
Parameters
Type Name Description
System.String name

Name of the property.

System.Object value

Value of the property.