Class CaseBuildFunction
Build a case (default: true), optionally considering related source cases
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class CaseBuildFunction : CaseChangeFunction, IDisposable
Examples
// Example with case value
(int)Employee["Level"] >= 2
// Example with related case value
HasCaseValue("Wage")
// Example with optional related case value
HasCaseValue("Wage") ? (int)Employee["Level"] >= 2 : false
Constructors
CaseBuildFunction(object)
Initializes a new instance with the function runtime
Declaration
public CaseBuildFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
CaseBuildFunction(string)
New function instance without runtime (scripting development)
Declaration
protected CaseBuildFunction(string sourceFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFileName | The name of the source file |
Remarks
Use GetSourceFileName(string) in your constructor for the source file name
Methods
AddInfo(string, object)
Add build info
Declaration
public void AddInfo(string name, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Info name |
| object | value | Info value |
Build()
Entry point for the runtime
Declaration
public bool? Build()
Returns
| Type | Description |
|---|---|
| bool? |
Remarks
Internal usage only, do not call this method
BuildInvalid()
Set case build to invalid
Declaration
public void BuildInvalid()
BuildValid()
Set case build to valid
Declaration
public void BuildValid()
BuildValidity(bool)
Set case build validity
Declaration
public void BuildValidity(bool valid)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | valid | Build validity |
RemoveInfo(string)
Remove build info
Declaration
public void RemoveInfo(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Info name |