Skip to content

v1.1.69

Latest

Choose a tag to compare

@abjerner abjerner released this 28 Aug 12:37

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 TimeSpanSecondsConverter and TimeSpanMillisecondsConverter converters for Newtonsoft.Json (see )
    The v1.1.x version of this package already has a TimeSpanSecondsConverter class, but this is obsolete as it lives in the wrong namespace. The TimeSpanConverter class may be used instead, but introducing TimeSpanSecondsConverter (and TimeSpanMillisecondsConverter) in the correct namespace makes usage a bit easier.

  • Improved logic for parsing time spans and durations (see 8f46a22)

    • added various TimeUtils.ParseTimeSpan methods (also supports ISO 8601 durations, which TimeSpan.Parse doesn't)
    • added XmlSchemaUtils.TryParseDuration method overload (nullable result)
  • Improved the logic for parsing IConfiguration values (see 82ecb6c, 8bcc480 and b965f35)

    • added GetEnum, GetRequiredEnum and TryGetEnum extension methods
    • added new GetTimeSpan, GetRequiredTimeSpan and TryGetTimeSpan extension methods
    • added ConfigurationException, InvalidConfigurationException and MissingConfigurationException exception classes
  • Added misc async methods to the JsonUtils class (see a311588)

    • added various LoadJsonArrayAsync, LoadJsonObjectAsync and LoadJsonTokenAsync extension methods
  • Added additional parse methods to the EssentialsTime class (see b9e1818)

    • added static ParseIso8601 method (replaces FromIso8601)
    • added static ParseRfc822 method (replaces FromRfc822)
    • added static ParseRfc2822 method (replaces FromRfc2822)
    • added various static ParseExact methods
    • added various static TryParseExact methods
  • Added misc non-generic collection initializers (see 8c1c1db)

    • added static ReadOnlyCollection.Empty(type), ReadOnlyList.Empty(type) and ReadOnlySet.Empty(type) methods for when using generics in methods calls isn't possible
  • Added new GlobalizationUtils class (see 208492b)
    For now, the class provides static methods for easily converting back and forth between UTF-8 and Punycode.