Show / Hide Table of Contents

Class PayrollValueExtensions

PayrollValue extension methods

Inheritance
object
PayrollValueExtensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Scripting
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public static class PayrollValueExtensions

Methods

Convert(PayrollValue, Type, object)

Convert payroll case value to custom type

Declaration
public static object Convert(this PayrollValue payrollValue, Type type, object defaultValue = null)
Parameters
Type Name Description
PayrollValue payrollValue
Type type

Target type

object defaultValue

The default value

Returns
Type Description
object

GetDecimalValues(IEnumerable<PayrollValue>)

Extract all decimal values

Declaration
public static IEnumerable<decimal> GetDecimalValues(this IEnumerable<PayrollValue> values)
Parameters
Type Name Description
IEnumerable<PayrollValue> values

The payroll values

Returns
Type Description
IEnumerable<decimal>

A list containing all decimal values

ToBoolean(PayrollValue)

Convert payroll case value to bool

Declaration
public static bool ToBoolean(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
bool

ToDateTime(PayrollValue)

Convert payroll case value to date time/>

Declaration
public static DateTime ToDateTime(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
DateTime

ToDecimal(PayrollValue)

Convert payroll case value to decimal

Declaration
public static decimal ToDecimal(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
decimal

ToDecimal(PayrollValue, DecimalRounding)

Convert payroll case value to decimal

Declaration
public static decimal ToDecimal(this PayrollValue payrollValue, DecimalRounding rounding)
Parameters
Type Name Description
PayrollValue payrollValue
DecimalRounding rounding

The rounding type

Returns
Type Description
decimal

ToInt(PayrollValue)

Convert payroll case value to int

Declaration
public static int ToInt(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
int

ToNullableBoolean(PayrollValue)

Convert payroll case value to nullable bool

Declaration
public static bool? ToNullableBoolean(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
bool?

ToNullableDateTime(PayrollValue)

Convert payroll case value to nullable date time/>

Declaration
public static DateTime? ToNullableDateTime(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
DateTime?

ToNullableDecimal(PayrollValue)

Convert payroll case value to nullable decimal/>

Declaration
public static decimal? ToNullableDecimal(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
decimal?

ToNullableDecimal(PayrollValue, DecimalRounding)

Convert payroll case value to nullable decimal/>

Declaration
public static decimal? ToNullableDecimal(this PayrollValue payrollValue, DecimalRounding rounding)
Parameters
Type Name Description
PayrollValue payrollValue
DecimalRounding rounding

The rounding type

Returns
Type Description
decimal?

ToNullableInt(PayrollValue)

Convert payroll case value to nullable int

Declaration
public static int? ToNullableInt(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
int?

ToString(PayrollValue)

Convert payroll case value to string

Declaration
public static string ToString(this PayrollValue payrollValue)
Parameters
Type Name Description
PayrollValue payrollValue
Returns
Type Description
string

ValueAs<T>(PayrollValue, T)

Convert payroll case value to custom type

Declaration
public static T ValueAs<T>(this PayrollValue payrollValue, T defaultValue = default)
Parameters
Type Name Description
PayrollValue payrollValue
T defaultValue

The default value

Returns
Type Description
T
Type Parameters
Name Description
T
☀
☾
Back to top Generated by DocFX