PayrollEngine.Client.Services 0.10.0-beta.1

This is a prerelease version of PayrollEngine.Client.Services.
dotnet add package PayrollEngine.Client.Services --version 0.10.0-beta.1
                    
NuGet\Install-Package PayrollEngine.Client.Services -Version 0.10.0-beta.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PayrollEngine.Client.Services" Version="0.10.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PayrollEngine.Client.Services" Version="0.10.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="PayrollEngine.Client.Services" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PayrollEngine.Client.Services --version 0.10.0-beta.1
                    
#r "nuget: PayrollEngine.Client.Services, 0.10.0-beta.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PayrollEngine.Client.Services@0.10.0-beta.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PayrollEngine.Client.Services&version=0.10.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PayrollEngine.Client.Services&version=0.10.0-beta.1&prerelease
                    
Install as a Cake Tool

Payroll Engine Client Services

Part of the Payroll Engine open-source payroll automation framework. Full documentation at payrollengine.org.

The main SDK for Payroll Engine client development. It provides the complete runtime infrastructure for executing payroll scripting functions locally, enabling local script development and testing against a live backend without deploying to the server.

Dependencies included:


Architecture

The library is organized into three areas:

Scripting

Period and cycle implementations used for local function execution:

Type Description
MonthPayrollPeriod Monthly payroll period
WeekPayrollPeriod Weekly payroll period
YearPayrollCycle Annual payroll cycle
WeekPayrollCycle Weekly payroll cycle
ScriptCalendar Combines configuration, calendar, and culture for script execution
ScriptContext Container for ScriptCalendar and regulation namespace
ScriptConfiguration Evaluation date, period date, regulation date, culture, and calendar

PayrollPeriodExtensions adds GetDatePeriod(), GetOffsetDatePeriod(), and GetContinuePeriods() to IPayrollPeriod.

Scripting.Function.Api

Controllers and invokers for executing scripting functions locally against a live backend via PayrollHttpClient:

Pattern Role
*Controller<TFunc> Instantiates the runtime, creates the function instance, invokes the script method, and returns a typed result
*FunctionInvoker<TFunc> Thin wrapper around a controller for simplified call sites
*FunctionResult Typed result carrying the function output and resolved context objects

Supported function types:

Function Controller Result
CaseAvailable CaseAvailableController CaseAvailableFunctionResult
CaseBuild CaseBuildController CaseBuildFunctionResult
CaseValidate CaseValidateController CaseValidateFunctionResult
CaseRelationBuild CaseRelationBuildController CaseRelationBuildFunctionResult
CaseRelationValidate CaseRelationValidateController CaseRelationValidateFunctionResult
ReportBuild ReportBuildController ReportBuildFunctionResult
ReportStart ReportStartController ReportStartFunctionResult
ReportEnd ReportEndController ReportEndFunctionResult

ReportParameterParser resolves identifier-based report parameters (employee, regulation, payroll, payrun, webhook, report) to their corresponding database IDs before execution.

Scripting.Runtime.Api

Concrete runtime implementations for every scripting function type. Each runtime implements the corresponding IRuntime interface from the Scripting library and handles API calls to the backend:

  • Base runtimes: RuntimeBasePayrollRuntimeCaseRuntimeBase, PayrunRuntimeBase, CollectorRuntimeBase, WageTypeRuntimeBase, ReportRuntime
  • Leaf runtimes: one per function event — CaseAvailableRuntime, CaseBuildRuntime, CaseValidateRuntime, CaseRelationBuildRuntime, CaseRelationValidateRuntime, CollectorStartRuntime, CollectorApplyRuntime, CollectorEndRuntime, WageTypeValueRuntime, WageTypeResultRuntime, PayrunStartRuntime, PayrunEndRuntime, PayrunEmployeeAvailableRuntime, PayrunEmployeeStartRuntime, PayrunEmployeeEndRuntime, PayrunWageTypeAvailableRuntime, ReportBuildRuntime, ReportStartRuntime, ReportEndRuntime

Culture and calendar resolution follows the standard priority: employee → division → tenant.

Webhooks are not supported through the client runtime. Calls to InvokeWebhook throw NotSupportedException.


Local Script Development

The SDK is the foundation for running function scripts outside the backend. Usage pattern:

// 1. Configure the scripting context
var config = new ScriptConfiguration
{
    EvaluationDate = DateTime.UtcNow,
    PeriodDate = new DateTime(2026, 3, 1, 0, 0, 0, DateTimeKind.Utc),
    RegulationDate = DateTime.UtcNow,
    CultureName = "de-CH"
};

// 2. Invoke via the function invoker
var httpClient = new PayrollHttpClient(backendUrl);
var invoker = new CaseAvailableFunctionInvoker<MyCaseAvailableFunction>(httpClient, config);
var result = invoker.Available("MySalaryCase");

Console.WriteLine($"Available: {result.Available}");

For report parameter resolution before invoking:

var parser = new ReportParameterParser(httpClient, tenantId, regulationId);
await parser.ParseParametersAsync(parameters); // resolves names → IDs

Developer Reference

The HTML API reference is generated with docfx. Commands in the docfx folder:

Command Description
Static.Build Build static HTML content (output: _site/)
Static.Start Open the static help (_site/index.html)
Server.Start Serve on http://localhost:4037/ with dark mode support

NuGet Package

Available on NuGet.org:

dotnet add package PayrollEngine.Client.Services

Build

Environment variable used during build:

Variable Description
PayrollEnginePackageDir Output directory for the NuGet package (optional)

Third Party Components

  • Documentation generation with docfx — license MIT

See Also

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.0-beta.1 42 3/9/2026
0.9.0-beta.17 58 2/18/2026
0.9.0-beta.16 58 2/11/2026
0.9.0-beta.15 54 2/5/2026
0.9.0-beta.14 66 1/14/2026
0.9.0-beta.13 67 1/7/2026
0.9.0-beta.12 165 11/5/2025
0.9.0-beta.11 215 10/13/2025
0.9.0-beta.10 219 9/14/2025
0.9.0-beta.9 253 8/26/2025
0.9.0-beta.8 138 8/25/2025
0.9.0-beta.7 144 8/11/2025
0.9.0-beta.6 155 3/27/2025
0.9.0-beta.5 98 3/14/2025
0.9.0-beta.4 161 3/12/2025
0.9.0-beta.3 94 2/25/2025
0.9.0-beta.1 98 2/12/2025
0.8.0-beta.2 101 7/10/2024
0.8.0-beta.1 210 11/27/2023
0.6.0-beta.11 123 10/10/2023
Loading failed