Class CaseFunction
Base class for all case scripting functions.
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public abstract class CaseFunction : PayrollFunction, IDisposable
Remarks
Provides access to the current case name and type, and read access to case attributes. Derives from PayrollFunction, which supplies the full payroll context: tenant, user, employee, payroll period, cycle, case values, and lookups.
Two concrete sub-hierarchies inherit from this class:
- CaseAvailableFunction — determines whether the case is offered for input.
- CaseChangeFunction — base for CaseBuildFunction and CaseValidateFunction.
Constructors
View SourceCaseFunction(object)
Initializes a new instance with the function runtime
Declaration
protected CaseFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
CaseFunction(string)
New function instance without runtime (scripting development)
Declaration
protected CaseFunction(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
Properties
View SourceCaseName
The case name
Declaration
[ActionProperty("Case name", null)]
public string CaseName { get; }
Property Value
| Type | Description |
|---|---|
| string |
CaseType
The case type
Declaration
public CaseType CaseType { get; }
Property Value
| Type | Description |
|---|---|
| CaseType |
Methods
View SourceGetCaseAttribute(string)
Get case attribute value
Declaration
public object GetCaseAttribute(string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName |
Returns
| Type | Description |
|---|---|
| object |
GetCaseAttribute<T>(string, T)
Get case attribute typed value
Declaration
public T GetCaseAttribute<T>(string attributeName, T defaultValue = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | attributeName | |
| T | defaultValue |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |