Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Class ActivityFlowContextPropertyAttribute

This attribute marks a property in an activity or a activity flow class as a context's property and the property will be registered to the ActivityFlowContext. ActivityFlowExecutionContext's property means the property is contained in the ActivityFlow context instead of the Activity.

Inheritance
System.Object
ActivityFlowContextPropertyAttribute
Namespace: Mediachase.Commerce.Engine
Assembly: Mediachase.Commerce.dll
Version: 14.26.0
Syntax
public sealed class ActivityFlowContextPropertyAttribute : Attribute
Remarks

When applied for an activity's property or activity flow's property, the property value will be populated automatically from context's property. And after the activity has completed, updated value will be persisted to the context's property.

Examples

The following example demonstrates how to declare a property for a activity flow, which gets and sets value from/to context's property. This is equivalent to this.Context.Property["Warnings"]

    [ActivityFlowContextProperty]
    public StringDictionary Warnings { get; set; }

Constructors

ActivityFlowContextPropertyAttribute()

Declaration
public ActivityFlowContextPropertyAttribute()