PeriodBuilder
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: PeriodBuilder.cs
A mutable builder class for Period values. Each property can be set independently, and then a Period can be created from the result using the BuildPeriod method.
public readonly struct PeriodBuilder
Properties
| Property | Type | Description |
|---|---|---|
| Days | int |
Gets or sets the number of days within the period. |
| Hours | long |
Gets or sets the number of hours within the period. |
| this[PeriodUnits] | long |
Gets or sets the value of a single unit. |
| Milliseconds | long |
Gets or sets the number of milliseconds within the period. |
| Minutes | long |
Gets or sets the number of minutes within the period. |
| Months | int |
Gets or sets the number of months within the period. |
| Nanoseconds | long |
Gets or sets the number of nanoseconds within the period. |
| Seconds | long |
Gets or sets the number of seconds within the period. |
| Ticks | long |
Gets or sets the number of ticks within the period. |
| Weeks | int |
Gets or sets the number of weeks within the period. |
| Years | int |
Gets or sets the number of years within the period. |
Methods
| Method | Description |
|---|---|
| BuildPeriod() | Builds a period from the properties in this builder. |
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue