Show / Hide Table of Contents

Interface ICalendarService

Payroll calendar service

Inherited Members
ICrudService<ICalendar, TenantServiceContext, Query>.UpdateAsync<T>(TenantServiceContext, T)
ICreateService<ICalendar, TenantServiceContext, Query>.CreateAsync<T>(TenantServiceContext, T)
ICreateService<ICalendar, TenantServiceContext, Query>.DeleteAsync(TenantServiceContext, int)
IReadService<ICalendar, TenantServiceContext, Query>.QueryAsync<T>(TenantServiceContext, Query)
IReadService<ICalendar, TenantServiceContext, Query>.QueryCountAsync(TenantServiceContext, Query)
IReadService<ICalendar, TenantServiceContext, Query>.QueryResultAsync<T>(TenantServiceContext, Query)
IReadService<ICalendar, TenantServiceContext, Query>.GetAsync<T>(TenantServiceContext, int)
Namespace: PayrollEngine.Client.Service
Assembly: PayrollEngine.Client.Core.dll
Syntax
public interface ICalendarService : ICrudService<ICalendar, TenantServiceContext, Query>, ICreateService<ICalendar, TenantServiceContext, Query>, IReadService<ICalendar, TenantServiceContext, Query>

Methods

CalculateValueAsync(int, decimal, string, string, DateTime?, DateTime?)

Calculate calendar value

Declaration
Task<decimal?> CalculateValueAsync(int tenantId, decimal value, string cultureName = null, string calendarName = null, DateTime? evaluationDate = null, DateTime? evaluationPeriodDate = null)
Parameters
Type Name Description
int tenantId

The tenant id

decimal value

The value to calculate

string cultureName

The culture to use (default: tenant culture)

string calendarName

The calendar name

DateTime? evaluationDate

The period evaluation date (default: now)

DateTime? evaluationPeriodDate

The date within the evaluation period (default: evaluation date)

Returns
Type Description
Task<decimal?>

The calendar value

GetAsync<T>(TenantServiceContext, string)

Get calendar by name

Declaration
Task<T> GetAsync<T>(TenantServiceContext context, string name) where T : class, ICalendar
Parameters
Type Name Description
TenantServiceContext context

The service context

string name

The calendar name

Returns
Type Description
Task<T>

The calendar, null if missing

Type Parameters
Name Description
T

GetCycleAsync(int, string, string, DateTime?, int?)

Get tenant calendar cycle

Declaration
Task<DatePeriod> GetCycleAsync(int tenantId, string cultureName = null, string calendarName = null, DateTime? cycleMoment = null, int? offset = null)
Parameters
Type Name Description
int tenantId

The tenant id

string cultureName

The culture to use (default: tenant culture)

string calendarName

The calendar name

DateTime? cycleMoment

The moment within the payrun cycle (default: now)

int? offset

The offset:
less than zero: past
zero: current (default)
greater than zero: future

Returns
Type Description
Task<DatePeriod>

The calendar cycle

GetPeriodAsync(int, string, string, DateTime?, int?)

Get tenant calendar period

Declaration
Task<DatePeriod> GetPeriodAsync(int tenantId, string cultureName = null, string calendarName = null, DateTime? periodMoment = null, int? offset = null)
Parameters
Type Name Description
int tenantId

The tenant id

string cultureName

The culture to use (default: tenant culture)

string calendarName

The calendar name

DateTime? periodMoment

The moment within the payrun period (default: now)

int? offset

The offset:
less than zero: past
zero: current (default)
greater than zero: future

Returns
Type Description
Task<DatePeriod>

The calendar period

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)
☀
☾
Back to top Generated by DocFX