Definition
Assembly: CloudNimble.EasyAF.Core.dll Namespace: CloudNimble.EasyAF.Core Inheritance: System.ObjectSyntax
Summary
Describes an interval of time to be used in time-based calculations. Provides methods to calculate rates and frequencies based on the interval value and type.Type Parameters
T- The data type for the interval value. Must implement IComparable`1 and IConvertible.
Examples
Constructors
.ctor
Creates a new instance of theInterval1` class.
Syntax
.ctor
Creates a new instance of theInterval1` class.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
value | T | The duration of the interval. |
type | CloudNimble.EasyAF.Core.IntervalType | The base unit that describes what the quantity of this Interval references. |
.ctor Inherited
Inherited from
objectSyntax
Properties
Type
The base unit that describes what the quantity of this Interval references.Syntax
Property Value
Type:CloudNimble.EasyAF.Core.IntervalType
Value
The duration of the Interval.Syntax
Property Value
Type:T
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
PerDay Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per day.
Syntax
Returns
Type:System.Decimal
The number of occurrences per day as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
PerDay Virtual
Given thisInterval1` instance and a quantity, calculates the total output per day.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per day as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
PerHour Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per hour.
Syntax
Returns
Type:System.Decimal
The number of occurrences per hour as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
PerHour Virtual
Given thisInterval1` instance and a quantity, calculates the total output per hour.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per hour as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
PerMinute Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per minute.
Syntax
Returns
Type:System.Decimal
The number of occurrences per minute as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Remarks
If you need this as a whole number, wrap the result in Decimal).PerMinute Virtual
Given thisInterval1` instance and a quantity, calculates the total output per minute.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per minute as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
PerMonth Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per month.
Syntax
Returns
Type:System.Decimal
The number of occurrences per month as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
PerMonth Virtual
Given thisInterval1` instance and a quantity, calculates the total output per month.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per month as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
PerWeek Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per week.
Syntax
Returns
Type:System.Decimal
The number of occurrences per week as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
PerWeek Virtual
Given thisInterval1` instance and a quantity, calculates the total output per week.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per week as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
PerYear Virtual
Given thisInterval1` instance, calculates how many occurrences will happen per year.
Syntax
Returns
Type:System.Decimal
The number of occurrences per year as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
PerYear Virtual
Given thisInterval1` instance and a quantity, calculates the total output per year.
Syntax
Parameters
| Name | Type | Description |
|---|---|---|
quantity | System.Decimal | The quantity to multiply by the interval frequency. |
Returns
Type:System.Decimal
The total output per year as a decimal value.
Exceptions
| Exception | Description |
|---|---|
InvalidCastException | Thrown if T is not convertible to a Decimal. |
Examples
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Override
Syntax
Returns
Type:string
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?