Click or drag to resize

IDslCompilerContextGetT Method (String)

Get value by name.

Namespace:  Casewhere.Runtime.DSL.CompilerContext
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
T Get<T>(
	string key
)

Parameters

key
Type: SystemString
The key.

Type Parameters

T
The variable type.

Return Value

Type: T
The variable value.
Examples
// Assuming a workflow has 2 activities like below:
// Activity 1:
ctx.Set("Confirmed", true);
ctx.Set("ConfirmedOption", 5);
// Activity 2:
if (ctx.Get<bool>("Confirmed"))
    DoSomething(ctx.Get<int>("ConfirmedOption"));
See Also