Click or drag to resize

IDslCompilerContextGetTempT Method

Get value by name in a context workflow. Throw an exception when key is not existed yet.

Namespace:  Casewhere.Runtime.DSL.CompilerContext
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
T GetTemp<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.SetTemp("Confirmed", true);
ctx.SetTemp("ConfirmedOption", 5);
// Activity 2:
if (ctx.GetTemp<bool>("Confirmed"))
    DoSomething(ctx.GetTemp<int>("ConfirmedOption"));
See Also