DurationConverter: handles converting an ISO 8601-formatted duration into a .NET TimeSpan? object. Example: P3Y6M4DT12H30M5S (three years, six months, four days, twelve hours, thirty minutes, and five seconds)
MapDurationConverter: handles converting a map of ISO 8601-formatted durations into a .NET IDictionary<string, TimeSpan> object.
Unit tests for DurationConverter and MapDurationConverter.
Updates:
ModelGenerator: copies DurationConverter.cs and MapDurationConverter.cs to destination.
Properties are now generated with [JsonConverter(typeof(DurationConverter))] or [JsonConverter(typeof(MapDurationConverter))] depending on DTDL model.
Adds:
DurationConverter
: handles converting an ISO 8601-formatted duration into a .NETTimeSpan?
object. Example:P3Y6M4DT12H30M5S
(three years, six months, four days, twelve hours, thirty minutes, and five seconds)MapDurationConverter
: handles converting a map of ISO 8601-formatted durations into a .NETIDictionary<string, TimeSpan>
object.DurationConverter
andMapDurationConverter
.Updates:
ModelGenerator
: copiesDurationConverter.cs
andMapDurationConverter.cs
to destination.[JsonConverter(typeof(DurationConverter))]
or[JsonConverter(typeof(MapDurationConverter))]
depending on DTDL model.Closes #16.