👉 This library is part of the Payroll Engine.
The base library for each Payroll Engine client, defining the commonality between the backend and the clients:
- Object model: Swagger schema as C# objects
- API services: Swagger endpoints as C# services
- Exchange tools: data import/export and data visitors
- Query expressions: OData based fluent API for building REST API queries
- Script parser and tools
- Console application tools
The HTTP Payroll configuration consists of the following values:
| Setting | Description | Default |
|---|---|---|
BaseUrl |
The backend base URL (string) | |
Port |
The backend url port (string) | None |
Timeout |
The backend request timeout (TimeSpan) | 100 seconds |
ApiKey |
The backend API key (string) | None |
The
ApiKeysetting should only be set in development environments.
Example of a JSON payroll http configuration apisettings.json:
{
"baseUrl": "https://localhost",
"port": 44354,
"timeout": "00:30:00"
}Example of a connection string containing the payroll http configuration:
BaseUrl=https://localhost; Port=44354; Timeout=00:30:00The configuration of the Payroll HTTP client is determined by the following priorities:
- Connection string from the
PayrollApiConnectionenvironment variable. - Configuration JSON file name from the
PayrollApiConfigurationenvironment variable. - Configuration JSON file
apisettings.jsonlocated in the program folder. - Program configuration
appsettings.jsonlocated in the program folder.
The base class for console applications,
ConsoleProgram<TApp>, uses this prioritization.
Supported runtime environment variables:
- PayrollEngineSchemaDir - the Json schema destination directory (optional)
- PayrollEnginePackageDir - the NuGet package destination directory (optional)