-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Short textual representation of the TimeSpan
- D,d - day
- H,h - hour
- M,m - minute
- S,s - second
For example:
With configuration class:
class Conf
{
public TimeSpan Delay;
}Section
<Conf Delay='1.5d' />Parsed to
settings.Get<Conf>("Conf").Delay == TimeSpan.FromDays(1.5)Section
<Conf Delay='80H' />Parsed to
settings.Get<Conf>("Conf").Delay == TimeSpan.FromHours(80)Section
<Conf Delay='600s' />Parsed to
settings.Get<Conf>("Conf").Delay == TimeSpan.FromSeconds(600)This is samples of valid strings:
- -3d
- 3.4d
- 3h30m
- 24h5s
- -72.5d8s
- -72.5d30.4h500m8s
- -72.5D30.4h500M8s
and invalid strings:
- -3p
- 3.4d8d
- 30m3h
- 24h-5s
- -72.5d8.s
- .5d
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels