Show / Hide Table of Contents

Class CasePayrollValue

Payroll value for a date period

Inheritance
object
PayrollValue
CasePayrollValue
Implements
IEnumerable<PeriodValue>
IEnumerable
Inherited Members
PayrollValue.Empty
PayrollValue.Round(int, MidpointRounding)
PayrollValue.RoundUp(decimal)
PayrollValue.RoundDown(decimal)
PayrollValue.Truncate(int)
PayrollValue.Equals(object)
PayrollValue.GetHashCode()
PayrollValue.Value
PayrollValue.IsNumeric
object.GetType()
object.MemberwiseClone()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class CasePayrollValue : PayrollValue, IEnumerable<PeriodValue>, IEnumerable

Constructors

CasePayrollValue(string)

Initializes a new instance of the CasePayrollValue class without values

Declaration
public CasePayrollValue(string caseFieldName)
Parameters
Type Name Description
string caseFieldName

Name of the case field

CasePayrollValue(string, IEnumerable<PeriodValue>)

Initializes a new instance of the CasePayrollValue class

Declaration
public CasePayrollValue(string caseFieldName, IEnumerable<PeriodValue> periodValues)
Parameters
Type Name Description
string caseFieldName

Name of the case field

IEnumerable<PeriodValue> periodValues

The period values

Properties

CaseFieldName

The case field name

Declaration
public string CaseFieldName { get; }
Property Value
Type Description
string

CurrentValue

The value

Declaration
protected override object CurrentValue { get; }
Property Value
Type Description
object
Overrides
PayrollValue.CurrentValue

HasPeriods

Test for period values

Declaration
[JsonIgnore]
public bool HasPeriods { get; }
Property Value
Type Description
bool

HasValue

Test if the payroll value is defined

Declaration
[JsonIgnore]
public override bool HasValue { get; }
Property Value
Type Description
bool
Overrides
PayrollValue.HasValue

PeriodValues

The period values

Declaration
public ReadOnlyCollection<PeriodValue> PeriodValues { get; }
Property Value
Type Description
ReadOnlyCollection<PeriodValue>

Methods

GetEnumerator()

Returns an enumerator that iterates through the collection

Declaration
public IEnumerator<PeriodValue> GetEnumerator()
Returns
Type Description
IEnumerator<PeriodValue>

An enumerator that can be used to iterate through the collection

ToKey()

Get the case value key

Declaration
public Key ToKey()
Returns
Type Description
Key

Case value key

ToString()

Returns a string that represents this instance

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance

Overrides
PayrollValue.ToString()

TotalValue()

Total payroll value, summary of period values

Declaration
public PayrollValue TotalValue()
Returns
Type Description
PayrollValue
Remarks

The reference comparison (value != PeriodValues.First()) is intentional: it uses the first element as the seed and only accumulates distinct subsequent entries. This is required for cancellation mode "Previous" where split periods produce multiple entries with equal values that must not be double-counted.

Operators

operator +(CasePayrollValue, CasePayrollValue)

Addition of two case values

Declaration
public static PayrollValue operator +(CasePayrollValue left, CasePayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
CasePayrollValue right
Returns
Type Description
PayrollValue

operator +(CasePayrollValue, PayrollValue)

Addition of a case value with a payroll value

Declaration
public static PayrollValue operator +(CasePayrollValue left, PayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
PayrollValue right
Returns
Type Description
PayrollValue

operator +(CasePayrollValue, PeriodValue)

Addition of a case value with a period value

Declaration
public static PayrollValue operator +(CasePayrollValue left, PeriodValue right)
Parameters
Type Name Description
CasePayrollValue left
PeriodValue right
Returns
Type Description
PayrollValue

operator /(CasePayrollValue, CasePayrollValue)

Division of two case values

Declaration
public static PayrollValue operator /(CasePayrollValue left, CasePayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
CasePayrollValue right
Returns
Type Description
PayrollValue

operator /(CasePayrollValue, PayrollValue)

Division of a case value with a payroll value

Declaration
public static PayrollValue operator /(CasePayrollValue left, PayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
PayrollValue right
Returns
Type Description
PayrollValue

operator /(CasePayrollValue, PeriodValue)

Division of a case value with a period value

Declaration
public static PayrollValue operator /(CasePayrollValue left, PeriodValue right)
Parameters
Type Name Description
CasePayrollValue left
PeriodValue right
Returns
Type Description
PayrollValue

implicit operator DateTime(CasePayrollValue)

Convert case value to DateTime

Declaration
public static implicit operator DateTime(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
DateTime

implicit operator decimal(CasePayrollValue)

Convert case value to decimal

Declaration
public static implicit operator decimal(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
decimal

implicit operator int(CasePayrollValue)

Convert case value to int/>

Declaration
public static implicit operator int(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
int

implicit operator DateTime?(CasePayrollValue)

Convert case value to nullable DateTime

Declaration
public static implicit operator DateTime?(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
DateTime?

implicit operator decimal?(CasePayrollValue)

Convert case value to nullable decimal

Declaration
public static implicit operator decimal?(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
decimal?

implicit operator int?(CasePayrollValue)

Convert case value to nullable int

Declaration
public static implicit operator int?(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
int?

implicit operator string(CasePayrollValue)

Convert case value to string/>

Declaration
public static implicit operator string(CasePayrollValue payrollValue)
Parameters
Type Name Description
CasePayrollValue payrollValue
Returns
Type Description
string

operator %(CasePayrollValue, CasePayrollValue)

Remainder of two case values

Declaration
public static PayrollValue operator %(CasePayrollValue left, CasePayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
CasePayrollValue right
Returns
Type Description
PayrollValue
Remarks

Fixed: uses period-matching like other binary operators to prevent IndexOutOfRangeException when collections differ in size.

operator %(CasePayrollValue, PayrollValue)

Remainder of a case value with a payroll value

Declaration
public static PayrollValue operator %(CasePayrollValue left, PayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
PayrollValue right
Returns
Type Description
PayrollValue

operator %(CasePayrollValue, PeriodValue)

Remainder of a case value with a period value

Declaration
public static PayrollValue operator %(CasePayrollValue left, PeriodValue right)
Parameters
Type Name Description
CasePayrollValue left
PeriodValue right
Returns
Type Description
PayrollValue

operator *(CasePayrollValue, CasePayrollValue)

Multiplication of two case values

Declaration
public static PayrollValue operator *(CasePayrollValue left, CasePayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
CasePayrollValue right
Returns
Type Description
PayrollValue

operator *(CasePayrollValue, PayrollValue)

Multiplication of a case value with a payroll value

Declaration
public static PayrollValue operator *(CasePayrollValue left, PayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
PayrollValue right
Returns
Type Description
PayrollValue

operator *(CasePayrollValue, PeriodValue)

Multiplication of a case value with a period value

Declaration
public static PayrollValue operator *(CasePayrollValue left, PeriodValue right)
Parameters
Type Name Description
CasePayrollValue left
PeriodValue right
Returns
Type Description
PayrollValue

operator -(CasePayrollValue, CasePayrollValue)

Subtraction of two case values

Declaration
public static PayrollValue operator -(CasePayrollValue left, CasePayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
CasePayrollValue right
Returns
Type Description
PayrollValue

operator -(CasePayrollValue, PayrollValue)

Subtraction of a case value with a payroll value

Declaration
public static PayrollValue operator -(CasePayrollValue left, PayrollValue right)
Parameters
Type Name Description
CasePayrollValue left
PayrollValue right
Returns
Type Description
PayrollValue

operator -(CasePayrollValue, PeriodValue)

Subtraction of a case value with a period value

Declaration
public static PayrollValue operator -(CasePayrollValue left, PeriodValue right)
Parameters
Type Name Description
CasePayrollValue left
PeriodValue right
Returns
Type Description
PayrollValue

Implements

IEnumerable<T>
IEnumerable

Extension Methods

PayrollValueExtensions.Convert(PayrollValue, Type, object)
PayrollValueExtensions.ToBoolean(PayrollValue)
PayrollValueExtensions.ToDateTime(PayrollValue)
PayrollValueExtensions.ToDecimal(PayrollValue)
PayrollValueExtensions.ToDecimal(PayrollValue, DecimalRounding)
PayrollValueExtensions.ToInt(PayrollValue)
PayrollValueExtensions.ToNullableBoolean(PayrollValue)
PayrollValueExtensions.ToNullableDateTime(PayrollValue)
PayrollValueExtensions.ToNullableDecimal(PayrollValue)
PayrollValueExtensions.ToNullableDecimal(PayrollValue, DecimalRounding)
PayrollValueExtensions.ToNullableInt(PayrollValue)
PayrollValueExtensions.ToString(PayrollValue)
PayrollValueExtensions.ValueAs<T>(PayrollValue, T)
PayrollValueExtensions.GetDecimalValues(IEnumerable<PayrollValue>)
EnumerableExtensions.ContainsAll<T>(IEnumerable<T>, IEnumerable<T>)
EnumerableExtensions.ContainsAny<T>(IEnumerable<T>, IEnumerable<T>)
PeriodValueExtensions.GetDurations(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriod(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriodEnd(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriodEnds(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriodStart(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriodStarts(IEnumerable<PeriodValue>)
PeriodValueExtensions.GetPeriods(IEnumerable<PeriodValue>)
PeriodValueExtensions.TotalDaysByValue(IEnumerable<PeriodValue>)
PeriodValueExtensions.TotalDaysByValue(IEnumerable<PeriodValue>, bool)
PeriodValueExtensions.TotalDuration(IEnumerable<PeriodValue>)
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