Class PayrollHttpConfiguration
The Payroll HTTP configuration
Inherited Members
Namespace: PayrollEngine.Client
Assembly: PayrollEngine.Client.Core.dll
Syntax
public class PayrollHttpConfiguration
Constructors
PayrollHttpConfiguration()
Default constructor
Declaration
public PayrollHttpConfiguration()
PayrollHttpConfiguration(string, int)
New instance of the Payroll Engine http client with unknown server certificate, timeout is 100 seconds. See https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout
Declaration
public PayrollHttpConfiguration(string baseUrl, int port)
Parameters
| Type | Name | Description |
|---|---|---|
| string | baseUrl | The Uri the request is sent to |
| int | port | The backend port |
PayrollHttpConfiguration(string, int, TimeSpan, string)
New instance of Payroll Engine http client with unknown server certificate and request timeout
Declaration
public PayrollHttpConfiguration(string baseUrl, int port, TimeSpan requestTimeout, string apiKey)
Parameters
| Type | Name | Description |
|---|---|---|
| string | baseUrl | The Uri the request is sent to |
| int | port | The backend port |
| TimeSpan | requestTimeout | The request timeout |
| string | apiKey | Api key |
Fields
DefaultTimeout
The default API request timeout
Declaration
public static readonly TimeSpan DefaultTimeout
Field Value
| Type | Description |
|---|---|
| TimeSpan |
Properties
ApiKey
The API key
Declaration
public string ApiKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
BaseUrl
The API base url
Declaration
public string BaseUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Port
The API port
Declaration
public int Port { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Timeout
The API request timeout
Declaration
public TimeSpan Timeout { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
Methods
FromConnectionString(string)
Payroll http configuration from a connection string
Declaration
public static PayrollHttpConfiguration FromConnectionString(string connectionString)
Parameters
| Type | Name | Description |
|---|---|---|
| string | connectionString | Configuration connection string |
Returns
| Type | Description |
|---|---|
| PayrollHttpConfiguration |
ToString()
Returns a string that represents this instance
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Valid()
Test for valid configuration
Declaration
public bool Valid()
Returns
| Type | Description |
|---|---|
| bool |