tag:github.com,2008:https://github.com/skybrud/Skybrud.Essentials/releasesRelease notes from Skybrud.Essentials2025-02-18T14:55:20Ztag:github.com,2008:Repository/70523300/v1.1.582025-02-18T15:12:27Zv1.1.58<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.58" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.58"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.58
</code></pre></div>
<p>or the NuGet Package Manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.58"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.58
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Added missing <code>[NotNullWhen(true)]</code> attribute to one of the <code>IsObsolete</code> method overloads</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/34643c8aebd2c498dd923ca01d99e8e7e4b0db9a/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/34643c8aebd2c498dd923ca01d99e8e7e4b0db9a"><tt>34643c8</tt></a>)<br>
This should make the code analysis happy again.</p>
</li>
<li>
<p><strong>Implemented <code>Extends</code> and <code>Implements</code> extension methods for the <code>Type</code> class</strong> (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2627851325" data-permission-text="Title is private" data-url="https://github.com/skybrud/Skybrud.Essentials/issues/49" data-hovercard-type="pull_request" data-hovercard-url="/skybrud/Skybrud.Essentials/pull/49/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/pull/49">#49</a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/c302d285ad43d82b4b5bb7fbf0f854b75d531f70/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/c302d285ad43d82b4b5bb7fbf0f854b75d531f70"><tt>c302d28</tt></a>)</p>
</li>
<li>
<p>The two new methods introduces a more "friendly" way to determine whether a type extends or implements another class or interface interface.</p>
</li>
<li>
<p><strong>Made <code>JsonTokenUtils</code> methods public</strong> (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2625561218" data-permission-text="Title is private" data-url="https://github.com/skybrud/Skybrud.Essentials/issues/48" data-hovercard-type="pull_request" data-hovercard-url="/skybrud/Skybrud.Essentials/pull/48/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/pull/48">#48</a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/aa3c562908ded5ac788761b5acb02eeeff012b8a/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/aa3c562908ded5ac788761b5acb02eeeff012b8a"><tt>aa3c562</tt></a>)<br>
The <code>JsonTokenUtils</code> class has been used internally in the package for a while for converting <code>JToken</code> instances into something else. Until now the methods have been internal, but since they have a broader usage than just within the package, they are now public instead.</p>
</li>
<li>
<p><strong>Added extension methods for the <code>Regex</code> class</strong> (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2625338702" data-permission-text="Title is private" data-url="https://github.com/skybrud/Skybrud.Essentials/issues/47" data-hovercard-type="pull_request" data-hovercard-url="/skybrud/Skybrud.Essentials/pull/47/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/pull/47">#47</a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/a7e921ed53a662c6f76d2575ebba432bd8470af5/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/a7e921ed53a662c6f76d2575ebba432bd8470af5"><tt>a7e921e</tt></a>)<br>
Similar to the <code>RegexUtils.IsMatch</code> methods already in the package, <code>IsMatch</code> extension methods are now available for <code>Regex</code> instances.</p>
</li>
<li>
<p><strong>Introduced new <code>GetRequired{Type}</code> extension methods for <code>JObject</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/16a07068bfe745c21acf1f689e3fcdaf4bc05c30/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/16a07068bfe745c21acf1f689e3fcdaf4bc05c30"><tt>16a0706</tt></a>)<br>
This release introduces an alternative to the existing <code>Get{Type}</code> extension methods. While the existing <code>GetString</code>, <code>GetInt32</code> and similar methods already in the package are designed to somewhat failed silent if the underlying property doesn't exist or the value type doesn't match, the <code>GetRequiredString</code>, <code>GetRequiredInt32</code> and similar methods will throw an exception if a required value isn't found.</p>
</li>
<li>
<p><strong>Added new <code>Get{Type}Value</code> and <code>GetRequired{Type}Value</code> extension methods for <code>XElement</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/b906fb6298504d8313bc40e16725c85f0cb22655/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/b906fb6298504d8313bc40e16725c85f0cb22655"><tt>b906fb6</tt></a>)<br>
These methods are intended to replace the existing <code>GetAttributeValue</code> and <code>GetElementValue</code> methods, since the new methods have better naming and also proper support for nullable (reference) types.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.572024-04-21T10:10:46Zv1.1.57<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.57" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.57"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.57
</code></pre></div>
<p>or the NuGet Package Manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.57"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.57
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Added <code>ToInvariantString</code> extension method overloads</strong> (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/211e9549b56e05a349d9b157d0188893a5958236/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/211e9549b56e05a349d9b157d0188893a5958236"><tt>211e954</tt></a>)<br>
Classes implementing the <code>IFormattable</code> interface indicates that they can be converted to a string representation using a specified format. The first overload therefore takes an instance of <code>IFormattable</code> and a second parameter for the format.</p>
<p>From .NET 7 and up, .NET features the <code>StringSyntaxAttribute</code> class, that can be used to specify the available format for the "format" parameter, which then can improve the intellisense. Additional extension method overloads for <code>DateTime</code>, <code>DateTimeOffset</code> and <code>TimeSpan</code> are added as well.</p>
<p>The extension method overloads are added for all of the current target frameworks. Since <code>StringSyntaxAttribute</code> is only supported from .NET 7 and up, Skybrud.Essentials adds an internal <code>StringSyntaxAttribute</code> class to also support older target frameworks. This should then - in theory - also allow better intellisense for those target frameworks.</p>
</li>
<li>
<p><strong>Updated the <code>EssentialsDate</code> and <code>EssentialsTime</code> classes to implement the <code>IFormattable</code> interface</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/65ae719be989b699044faf4146750d2a0fd79d6e/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/65ae719be989b699044faf4146750d2a0fd79d6e"><tt>65ae719</tt></a>)<br>
By implementing the <code>IFormattable</code> interface a format may now be specified when using the <code>EssentialsDate</code> and <code>EssentialsTime</code> classes in string interpolation.</p>
</li>
<li>
<p><strong>Added <code>StringSyntaxAttribute</code> to various <code>format</code> parameters</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/2cd19a5cc79c595d54da8e088a09174409c8b4f9/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/2cd19a5cc79c595d54da8e088a09174409c8b4f9"><tt>2cd19a5</tt></a>)<br>
This may help IDEs give a better developer experience by indicating the format to be used.</p>
</li>
<li>
<p><strong>Added <code>Split</code> extension method overloads</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/20eafeec25dde6d9730fc11c3199147d0515f942/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/20eafeec25dde6d9730fc11c3199147d0515f942"><tt>20eafee</tt></a>)<br>
The package already contains a number of <code>Split</code> extension methods. With this release, a number of additional overloads have been added with additonal parameters.</p>
</li>
<li>
<p><strong>Introduced new <code>ReadOnlySet</code> class and <code>ReadOnlySet.Empty<T></code> static method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/fc0614e0e6a898d666c703cf03253be48a7d7759/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/fc0614e0e6a898d666c703cf03253be48a7d7759"><tt>fc0614e</tt></a>)<br>
Similar to the <code>Enumerable.Empty<T></code> and <code>Array.Empty</code> method in .NET, Skybrud.Essentials now offers a method to get an empty immutable instance of <code>IReadOnlySet</code>. As the <code>IReadOnlySet</code> interface is only supported from .NET 5 and up, the new class and method is also only available for .NET 5 and up, but not .NET Framework and .NET Standard.</p>
</li>
<li>
<p><strong>Added additional <code>RegexUtils.IsMatch</code> extension method overloads</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/a5c5148fd7a31dad557721fafda7967704cc10ee/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/a5c5148fd7a31dad557721fafda7967704cc10ee"><tt>a5c5148</tt></a>)<br>
The new overloads support additional scenarios - e.g. with more out parameters.</p>
</li>
<li>
<p><strong>Introduced new static <code>ParseStringList</code> and <code>ParseStringReadOnlyList</code> methods</strong> (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/fbccb0d19c2eddb4f3bf5cc68f241d44a0ed22fd/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/fbccb0d19c2eddb4f3bf5cc68f241d44a0ed22fd"><tt>fbccb0d</tt></a>)<br>
Supports a few additional scenarios - in additional to the existing <code>ParseStringArray</code> method.</p>
</li>
<li>
<p><strong><code>EssentialsDate.ToString</code> methods should be culture invariant when no culture is specified</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/782e932397092bd5822c1d307754171abea7759d/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/782e932397092bd5822c1d307754171abea7759d"><tt>782e932</tt></a>)<br>
This has always been my intention, b</p>
</li>
<li>
<p><strong>Added fallback format when no formatting is specified for the <code>EssentialsDate.ToString</code> and <code>EssentialsTime.ToString</code> methods</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/85316d9e84060efa35fb1abb19153b5bf085d7cf/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/85316d9e84060efa35fb1abb19153b5bf085d7cf"><tt>85316d9</tt></a>)<br>
Normally when an object is used in string interpolation, the object's parameterless <code>ToString</code> method is called for getting a string representation of the object. But if the object implements the <code>IFormattable</code> interface - as both <code>EssentialsDate</code> and <code>EssentialsTime</code> do now - the <code>ToString(string? format, IFormatProvider? provider)</code> method will be called instead, but with the <code>format</code> parameter being null. In order to not introduce any breaking changes, the <code>EssentialsDate.ToString(string? format, IFormatProvider? provider)</code> and <code>EssentialsTime.ToString(string? format, IFormatProvider? provider)</code> methods have now been updated to return the same value as the parameterless <code>EssentialsDate.ToString()</code> and <code>EssentialsTime.ToString()</code> methods, which are an ISO 8601 formatted date and timestamp respectively.</p>
</li>
<li>
<p><strong>Added <code>ToEssentialsDate</code> and <code>ToEssentialsTime</code> extension methods for both <code>DateTime</code> and <code>DateTimeOffset</code></strong> (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/d556dc99a8b0652df49d9d5f5e4de502b8960a1e/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/d556dc99a8b0652df49d9d5f5e4de502b8960a1e"><tt>d556dc9</tt></a>)<br>
The extension methods offer the same functionality as the <code>EssentialsDate</code> and <code>EssentialsTime</code> constructors, but may be used in a method chain which is not possible with a constructor.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.562024-02-06T08:28:29Zv1.1.56<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.56" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.56"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.56
</code></pre></div>
<p>or the NuGet Package Manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.56"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.56
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li><strong>The <code>JsonObjectBaseConverter</code> class shouldn't be internal</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/58c34a71a0256c1d2300006af88cf276de176d90/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/58c34a71a0256c1d2300006af88cf276de176d90"><tt>58c34a7</tt></a>)<br>
Class was copied from a client project, and I didn't notice the class was internal. It should be public in order for it to be used outside of the package.</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.552024-02-05T22:12:17Zv1.1.55<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.55" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.55"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.55
</code></pre></div>
<p>or the NuGet Package Manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.55"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.55
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Introduced new <code>SelectArray</code> extension method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/e68d941d85ff3ad000b85ec015c7e785997d271c/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/e68d941d85ff3ad000b85ec015c7e785997d271c"><tt>e68d941</tt></a>)<br>
Basically a shorter version of <code>.Select(...).ToArray()</code>.</p>
</li>
<li>
<p><strong>Introduced new <code>SelectReadOnlyList</code> extension method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/744fb20adf478550f49f14372beccb41f2bc0c93/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/744fb20adf478550f49f14372beccb41f2bc0c93"><tt>744fb20</tt></a>)<br>
An alternative version of <code>.Select(...).ToArray()</code> or <code>.Select(...).ToList()</code>.</p>
</li>
<li>
<p><strong>Introduced new <code>AppendTo</code> extension method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/c6f575c9dec37e7457943e32b417024b6b0610bb/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/c6f575c9dec37e7457943e32b417024b6b0610bb"><tt>c6f575c</tt></a>)<br>
The method allows appending an <code>IEnumerable<T></code> to a <code>List<T></code> - eg. via at the end of a method chain.</p>
</li>
<li>
<p><strong>Introduced new <code>ReadOnlyCollection</code> and <code>ReadOnlyList</code> classes</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/d8ab691ddad1086ceede9934370392202f4ff41d/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/d8ab691ddad1086ceede9934370392202f4ff41d"><tt>d8ab691</tt></a>)<br>
This also introduces the static <code>ReadOnlyCollection.Empty<T></code> and <code>ReadOnlyList<T></code> methods as an alternative to <code>Array.Empty<T></code>.</p>
</li>
<li>
<p><strong>Introduced <code>IsDanish</code>, <code>IsEnglish</code> and <code>IsGerman</code> extension methods for <code>CultureInfo</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/2def2c59af070b6e7a5012818589864297c9cead/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/2def2c59af070b6e7a5012818589864297c9cead"><tt>2def2c5</tt></a>)<br>
Allows checking whether a <code>CultureInfo</code> instance represents either a Danish, English or German language.</p>
</li>
<li>
<p><strong>Introduced new <code>JsonObjectBaseConverter</code> JSON converter</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/6c2cfc122ef2fc17a0e919b5c18eb6201bbc8722/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/6c2cfc122ef2fc17a0e919b5c18eb6201bbc8722"><tt>6c2cfc1</tt></a>)<br>
The converter allows converting a <code>JsonObjectBase</code> instance to a JSON string and from a JSON string to a <code>JsonObjectBase</code> instance.</p>
</li>
<li>
<p><strong>Introduced new <code>FirstCharToLower</code> extension method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/d298fdbbd27f18f2f9a00166e4d234987df7bc93/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/d298fdbbd27f18f2f9a00166e4d234987df7bc93"><tt>d298fdb</tt></a>)<br>
Replaces the first character of an input string to it's lower case representation.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.542024-02-05T21:59:15Zv1.1.54<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.54" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.54"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.54
</code></pre></div>
<p>or the NuGet Package Manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.54"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.54
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Compile constants for .NET 5 and .NET 6 should also apply to .NET 7 and .NET 8</strong> (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1999706493" data-permission-text="Title is private" data-url="https://github.com/skybrud/Skybrud.Essentials/issues/44" data-hovercard-type="issue" data-hovercard-url="/skybrud/Skybrud.Essentials/issues/44/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/issues/44">#44</a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/6fe82aa4d6b6249dd0a45c82a34032504b38f800/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/6fe82aa4d6b6249dd0a45c82a34032504b38f800"><tt>6fe82aa</tt></a>)<br>
For the <code>v1.1.53</code> I added .NET 7 as an additional target framework, but forgot updating the compile constants used throughout the package, so large portions of the package weren't part of <code>v1.1.53</code> when using the .NET 7 build. This release fixes the compile constants so the missing functionality is now is back.</p>
</li>
<li>
<p><strong>Changed compile constants used in the <code>NameValueCollectionExtensions.cs</code> file and similar files</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/8790b8781d07aec7169966fce27b6dd61b7a8440/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/8790b8781d07aec7169966fce27b6dd61b7a8440"><tt>8790b87</tt></a>)<br>
Prior to this commit, the file content has only been enabled when the <code>NET_FRAMEWORK</code> compile constant is set. While the <code>NameValueCollection</code> class isn't available in all target frameworks, it is available from .NET Standard 2.0 and up as well as .NET 5 and up. To also enabled the file content for these target frameworks, we should instead check against the <code>I_CAN_HAS_NAME_VALUE_COLLECTION</code> compile constant.</p>
</li>
<li>
<p><strong>Added <code>ToTitleCase</code> extension methods</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/fc2f736d91eaf79b6ba9dcbbeb1179fd2a045318/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/fc2f736d91eaf79b6ba9dcbbeb1179fd2a045318"><tt>fc2f736</tt></a>)<br>
The implementation uses .NET's <code>TextInfo.ToTitleCase</code> method to convert a string to title case.</p>
</li>
<li>
<p><strong>Added additional extension methods for "NameValueCollection"</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/a93bfd093dabcbfbe913bcaa4856013ee23f657a/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/a93bfd093dabcbfbe913bcaa4856013ee23f657a"><tt>a93bfd0</tt></a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/a68aa064e5355fb0925e8c97342fe1defe5b4b8d/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/a68aa064e5355fb0925e8c97342fe1defe5b4b8d"><tt>a68aa06</tt></a>)<br>
This provides some additional functionality for reading and parsing values from a <code>NameValueCollection</code> and also matches similar named extension methods for other collection.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.532023-11-03T19:45:19Zv1.1.53<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.53" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.53"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.53
</code></pre></div>
<p>or the NuGet package manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.53"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.53
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Added .NET 7 as an additional target framework</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/3bc7637a6973982d497c84f06fb5a4a1020b1b73/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/3bc7637a6973982d497c84f06fb5a4a1020b1b73"><tt>3bc7637</tt></a>)<br>
This means that the package can start using some of the newer C# features that are specific to .NET 7.</p>
</li>
<li>
<p><strong>Added additional properties to <code>EssentialsTime</code> that exists on <code>DateTimeOffset</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/7887034fd9ac4f29a7cbc7cd166a319b15624e39/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/7887034fd9ac4f29a7cbc7cd166a319b15624e39"><tt>7887034</tt></a>)<br>
The following properties were added:</p>
<ul>
<li><code>Date</code></li>
<li><code>DateTime</code></li>
<li><code>LocalDateTime</code></li>
<li><code>UtcDateTime</code></li>
<li><code>Microsecond</code> (.NET 7+)</li>
<li><code>Nanosecond</code> (.NET 7+)</li>
<li><code>UtcTicks</code></li>
</ul>
</li>
<li>
<p><strong>Added <code>IsSameDay</code> extension methods for <code>DateTime</code> and <code>DateTimeOffset</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/e5fed3144e33be42f00e6eabf6302feff3f76f3d/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/e5fed3144e33be42f00e6eabf6302feff3f76f3d"><tt>e5fed31</tt></a>)<br>
Similar methods already exist as static utility methods, so they might as well be available as extension methods.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.522023-09-12T15:01:14Zv1.1.52<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.52" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.52"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.52
</code></pre></div>
<p>or the NuGet package manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.52"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.52
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li><strong>Improved the logic for reading from <code>NameValueCollection</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/e1c6759b8ecaa781dc5de00e031a50b6529a8b83/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/e1c6759b8ecaa781dc5de00e031a50b6529a8b83"><tt>e1c6759</tt></a>)</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.512023-09-11T10:58:31Zv1.1.51<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.51" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.51"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.51
</code></pre></div>
<p>or the NuGet package manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.51"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.51
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Added <code>.ToIso8601</code> extension methods for converting <code>DateTime</code>, <code>DateTimeOffset</code> and <code>TimeSpan</code> instances to their ISO 8601 representation</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/955cc60f080e69a83edbfbda5b66866b78d23723/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/955cc60f080e69a83edbfbda5b66866b78d23723"><tt>955cc60</tt></a>)<br>
As an alternative to the static <code>Iso8601Utils.ToString</code> methods, similar functionality is now available as extension methods.</p>
</li>
<li>
<p><strong>Added <code>InvariantFormat</code> static method and <code>ToInvariantString</code> extension method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/54c72189be65241e7c0075f2a4e76a43120a03e6/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/54c72189be65241e7c0075f2a4e76a43120a03e6"><tt>54c7218</tt></a>)<br>
Adds a bit of extra functionality for easily converting an instance to an invariant string. Probably most relevant for numbers and other simple types.</p>
</li>
<li>
<p><strong>Added new <code>GetMethodInfo</code> and <code>GetPropertyInfo</code> methods to the <code>ReflectionUtils</code> class</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/f12eb5f1493f85f1888ca16256438135aafed4f8/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/f12eb5f1493f85f1888ca16256438135aafed4f8"><tt>f12eb5f</tt></a>)<br>
The methods allows getting either method info or property info of an expression using reflection.</p>
</li>
<li>
<p><strong>Added static <code>Min</code> and <code>Max</code> methods for getting the minimum and maximum values of two or more <code>DateTime</code> or <code>DateTimeOffset</code> instances</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/7858f98e9b2d020514b85d740908e3c8b67c9cd1/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/7858f98e9b2d020514b85d740908e3c8b67c9cd1"><tt>7858f98</tt></a>)<br>
Might be slightly easier to get the minimum or maximum with these methods.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.502023-07-13T09:46:08Zv1.1.50<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.50" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.50"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.50
</code></pre></div>
<p>or the NuGet package manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.50"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.50
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>The <code>json</code> parameter of the <code>TryParseJson...</code> methods should be nullable</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/ee2d02bec50ddcf6c66a7f1d19919d39433d5884/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/ee2d02bec50ddcf6c66a7f1d19919d39433d5884"><tt>ee2d02b</tt></a>)<br>
No reason not to. If the <code>json</code> parameter is <code>null</code>, parsing will fail and the methods will return <code>false</code>.</p>
</li>
<li>
<p><strong>Added misc extension methods for <code>IDictionary<object, object?></code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/9fef978ddef34dbbd1a2b0ede5673e4b9a16267c/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/9fef978ddef34dbbd1a2b0ede5673e4b9a16267c"><tt>9fef978</tt></a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/373408f0e80ccd43c66c41269bc46d6a068c6a59/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/373408f0e80ccd43c66c41269bc46d6a068c6a59"><tt>373408f</tt></a>)<br>
The new extension methods creates an easier way to get type specific values from the dictionary - eg. <code>GetInt32</code> and <code>TryGetInt32</code> extension methods for getting a value as an integer.</p>
</li>
<li>
<p><strong>Fixed <code>ArrayUtils.Empty(type)</code> method</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/c65912a568eb1734424f2848c515ea438bd1ea71/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/c65912a568eb1734424f2848c515ea438bd1ea71"><tt>c65912a</tt></a>)<br>
The method uses reflection to call the generic method overload, but would fail to so. The added unit test confirms the issue as well as that the issue has now been fixed.</p>
</li>
<li>
<p><strong>Added <code>RegexReplace</code> extension methods for <code>System.String</code></strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/00679ed20d1e05c68f877148a0f91d6d2b3cbbc9/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/00679ed20d1e05c68f877148a0f91d6d2b3cbbc9"><tt>00679ed</tt></a>)<br>
The new <code>RegeExtensions.RegexReplace</code> extensions methods allows doing a regex replacements in a method chain opposed to using .NET's static <code>Regex.Replace</code> methods.</p>
</li>
</ul>abjernertag:github.com,2008:Repository/70523300/v1.1.492023-06-02T20:12:20Zv1.1.49<h3>Installation</h3>
<p>Install via <a href="https://www.nuget.org/packages/Skybrud.Essentials/1.1.49" rel="nofollow"><strong>NuGet</strong></a> - either via the .NET CLI:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dotnet add package Skybrud.Essentials --version 1.1.49"><pre class="notranslate"><code>dotnet add package Skybrud.Essentials --version 1.1.49
</code></pre></div>
<p>or the NuGet package manager:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Install-Package Skybrud.Essentials -Version 1.1.49"><pre class="notranslate"><code>Install-Package Skybrud.Essentials -Version 1.1.49
</code></pre></div>
<h3>Changelog</h3>
<ul>
<li>
<p><strong>Updated nullable annotations for the <code>StringUtils.FirstWithValue</code> methods</strong> (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1709736177" data-permission-text="Title is private" data-url="https://github.com/skybrud/Skybrud.Essentials/issues/43" data-hovercard-type="issue" data-hovercard-url="/skybrud/Skybrud.Essentials/issues/43/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/issues/43">#43</a> and <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/7ccd11df897d3a3d2eb717f62a8dfadc0bf95677/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/7ccd11df897d3a3d2eb717f62a8dfadc0bf95677"><tt>7ccd11d</tt></a>)<br>
Two of the <code>FirstWithValue</code> method overloads supports specifying an array or a collection of string values respectively. The nullable annotations allowed the arrays/collections to be <code>null</code>, but not the individual values. As if this release, both are now allowed to be <code>null</code>.</p>
</li>
<li>
<p><strong>Added <code>[NotNullIfNotNull("value")]</code> attributes to the first out parameter of <code>StringExtensions.Split</code> methods</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/70a0ef97f493fb85c4b995408a6354609f35b745/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/70a0ef97f493fb85c4b995408a6354609f35b745"><tt>70a0ef9</tt></a>)<br>
Since splitting a string always results in an array with at least one item, the first out parameter is known to be not null if <code>value</code> is not null.</p>
</li>
<li>
<p><strong>Copied JSON converters to the <code>Newtonsoft</code> namespace</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/ede5e46d1b3966672c6c33ca3fe645b96dc63197/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/ede5e46d1b3966672c6c33ca3fe645b96dc63197"><tt>ede5e46</tt></a>)<br>
Two differentiate between Newtonsoft.Json and System.Text.Json, the existing JSON converters have been copied to the <code>Skybrud.Essentials.Json.Newtonsoft.Converters</code> namespace. The JSON converters are copied rather than moved since that would be a breaking change. The existing JSON converters are instead marked as obsolete.</p>
</li>
<li>
<p><strong>Added various utility and extension methods for the <code>Assembly</code> class</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/56439628585d3ee85a7bbb0e9deafea6d2498a90/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/56439628585d3ee85a7bbb0e9deafea6d2498a90"><tt>5643962</tt></a>)<br>
The new methods allow getting various details of an assembly.</p>
</li>
<li>
<p><strong>Marked <code>JArrayExtensions</code> and <code>JObjectExtensions</code> classes</strong> (see <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/skybrud/Skybrud.Essentials/commit/403145acb1640f909a7b28b03d142f52fd4ff8db/hovercard" href="https://github.com/skybrud/Skybrud.Essentials/commit/403145acb1640f909a7b28b03d142f52fd4ff8db"><tt>403145a</tt></a>)<br>
The classes in the <code>Skybrud.Essentials.Json.Extensions</code> has been marked as obsolete as similar classes are found in the <code>Skybrud.Essentials.Json.Extensions.Newtonsoft</code> namespace.</p>
</li>
</ul>abjerner