Target Frameworks
- .NET Standard 1.1
- .NET Standard 1.3
- .NET Standard 2.0
- .NET Framework 4.5
- .NET Framework 4.6
- .NET Framework 4.7
- .NET 5.0
- .NET 6.0
- .NET 7.0
- .NET 8.0
- .NET 10.0
Installation
Install via NuGet - either via the .NET CLI:
dotnet add package Skybrud.Essentials --version 1.1.69
or the NuGet Package Manager:
Install-Package Skybrud.Essentials -Version 1.1.69
Changelog
-
Added
TimeSpanSecondsConverterandTimeSpanMillisecondsConverterconverters forNewtonsoft.Json(see )
The v1.1.x version of this package already has aTimeSpanSecondsConverterclass, but this is obsolete as it lives in the wrong namespace. TheTimeSpanConverterclass may be used instead, but introducingTimeSpanSecondsConverter(andTimeSpanMillisecondsConverter) in the correct namespace makes usage a bit easier. -
Improved logic for parsing time spans and durations (see 8f46a22)
- added various
TimeUtils.ParseTimeSpanmethods (also supports ISO 8601 durations, whichTimeSpan.Parsedoesn't) - added
XmlSchemaUtils.TryParseDurationmethod overload (nullable result)
- added various
-
Improved the logic for parsing
IConfigurationvalues (see 82ecb6c, 8bcc480 and b965f35)- added
GetEnum,GetRequiredEnumandTryGetEnumextension methods - added new
GetTimeSpan,GetRequiredTimeSpanandTryGetTimeSpanextension methods - added
ConfigurationException,InvalidConfigurationExceptionandMissingConfigurationExceptionexception classes
- added
-
Added misc async methods to the
JsonUtilsclass (see a311588)- added various
LoadJsonArrayAsync,LoadJsonObjectAsyncandLoadJsonTokenAsyncextension methods
- added various
-
Added additional parse methods to the
EssentialsTimeclass (see b9e1818)- added static
ParseIso8601method (replacesFromIso8601) - added static
ParseRfc822method (replacesFromRfc822) - added static
ParseRfc2822method (replacesFromRfc2822) - added various static
ParseExactmethods - added various static
TryParseExactmethods
- added static
-
Added misc non-generic collection initializers (see 8c1c1db)
- added static
ReadOnlyCollection.Empty(type),ReadOnlyList.Empty(type)andReadOnlySet.Empty(type)methods for when using generics in methods calls isn't possible
- added static
-
Added new
GlobalizationUtilsclass (see 208492b)
For now, the class provides static methods for easily converting back and forth between UTF-8 and Punycode.