Jakar.Extensions 9.17.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Jakar.Extensions --version 9.17.0
                    
NuGet\Install-Package Jakar.Extensions -Version 9.17.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jakar.Extensions" Version="9.17.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jakar.Extensions" Version="9.17.0" />
                    
Directory.Packages.props
<PackageReference Include="Jakar.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jakar.Extensions --version 9.17.0
                    
#r "nuget: Jakar.Extensions, 9.17.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jakar.Extensions@9.17.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jakar.Extensions&version=9.17.0
                    
Install as a Cake Addin
#tool nuget:?package=Jakar.Extensions&version=9.17.0
                    
Install as a Cake Tool

Jakar.Extensions

Contributions and Ideas are Welcome.

Overview

Jakar.Extensions is a .NET library that includes a variety of extensions and helper methods designed to streamline and enhance the development process. This package provides utility functions for common tasks, making your code cleaner and more maintainable.

Installation

You can install the Jakar.Extensions package via Nuget:

dotnet add package Jakar.Extensions

Alternatively, you can use the NuGet Package Manager in Visual Studio.

Features and Hhighlights of the extensions provided by this package.

Base classes

  • ObservableClass : A base class that implements the INotifyPropertyChanged and INotifyPropertyChanging interface.
  • ObservableRecord : A base record that implements the INotifyPropertyChanged and INotifyPropertyChanging interface.

Collection

  • ObservableConcurrentDictionary : A thread-safe dictionary that supports change notifications.
  • ObservableDictionary : A dictionary that supports change notifications.
  • ConcurrentObservableCollection : A thread-safe collection that supports change notifications.
  • ConcurrentHashSet : A thread-safe hash set.
  • ConcurrentDeque : A thread-safe queue.
  • FixedSizedDeque : A fixed-size deque.
  • FixedSizedQueue : A fixed-size queue.

HTTP

  • WebRequester : A wrapper for System.Net.Http.HttpClient that simplifies the process of making HTTP requests and accepts an IHostInfo object to provide the base Uri. Also supports automatic retries.
  • WebHandler : An intermediate class that provides a way to handle the response from the WebRequester class.
  • WebResponse : The representation of the response from the WebRequester class.
  • Status : An enumration of the possible HTTP status codes.
  • MimeType : An enumeration of the possible MIME types.
  • MimeTypeNames : The equivalent string representation of the MimeType enumration.

Miscellaneous

  • SecuredString : A class that provides a way to store sensitive data in memory securely.
  • Validate : A static class that provides a way to validate various strings and states.
  • Tasks : A static class that provides a way to handle tasks such as SafeFireAndForget.
  • TypeExtensions : A static class that provides methods to see if they are ISet, IList or IDictionary and get the types or see if its a built in class or struct, or if its nullable.
  • IDataProtector and IDataProtectorProvider : A class to encrypt and decrypt strings.
  • ErrorOrResult : A struct that represents a result or an error.
  • LocalFile : A class that provides a way to easily handle local files such as reading and writing.
  • LocalDirectory : A class that provides a way to easily manage local directories such as creating and deleting, and getting files.
  • PasswordValidator : A class that provides an efficient way to validate passwords.
  • LoginRequest : A standard way to handle login requests.

AsyncLinq

Many of the following methods have overloads:

  • Average
  • AsAsyncEnumerable
  • IsEmpty
  • ToHashSet
  • ToList
  • GetArray
  • ToArray
  • Sorted
  • ToObservableCollection
  • Enumerate
  • EnumeratePairs
  • Append
  • Prepend
  • Cast
  • CastSafe
  • Distinct
  • DistinctBy
  • Skip
  • SkipLast
  • SkipWhile
  • Where
  • Select
  • Consolidate
  • ConsolidateUnique
  • WhereNotNull
  • WhereNotNullAsync
  • All
  • Any
  • ForEachAsync
  • ForEachParallelAsync
  • WhenAllParallelAsync
  • ForEach
  • ForEachParallel
  • Max
  • Min
  • Add
  • AddOrUpdate
  • Remove
  • TryAdd
  • AddDefault
  • Random
  • RandomValues
  • RandomKeys
  • Range
  • First
  • FirstOrDefault
  • Last
  • LastOrDefault
  • Single
  • SingleOrDefault

Hashes

Many of the following methods have overloads:

  • GetHash
  • Hash128
  • Hash
  • ToBytes
  • Hash_MD5
  • Hash_SHA1
  • Hash_SHA256
  • Hash_SHA384
  • Hash_SHA512
  • HashAsync
  • HashAsync_MD5
  • HashAsync_SHA1
  • HashAsync_SHA256
  • HashAsync_SHA384
  • HashAsync_SHA512

Types

Many of the following methods have overloads:

  • GetJsonIsRequired
  • GetJsonProperty
  • GetJsonKey
  • IsAnyBuiltInType
  • IsBuiltInNullableType
  • IsBuiltInType
  • IsGenericType
  • IsNullableType
  • IsInitOnly
  • IsEqualType
  • IsOneOfType
  • Construct
  • HasInterface
  • IsCollection
  • IsDictionary
  • IsDictionaryEntry
  • IsKeyValuePair
  • IsList
  • IsSet
  • MethodInfo
  • GetParameterInfo
  • MethodName
  • MethodSignature
  • MethodClass
  • IsNullable
  • TryGetUnderlyingEnumType

Spans

Many of the following methods have overloads:

  • Average
  • ContainsAny
  • ContainsAnyExcept
  • IndexOfAnyExcept
  • IndexOfAny
  • LastIndexOfAny
  • LastIndexOfAnyExcept
  • Contains
  • ContainsAll
  • ContainsNone
  • EndsWith
  • StartsWith
  • AsBytes
  • IsNullOrWhiteSpace
  • SequenceEqualAny
  • SequenceEqual
  • LastIndexOf
  • Enumerate
  • AsSpan
  • AsReadOnlySpan
  • CopyTo
  • TryCopyTo
  • CreateSpan
  • CreateValue
  • Create
  • QuickSort
  • First
  • FirstOrDefault
  • All
  • Any
  • Single
  • SingleOrDefault
  • Where
  • WhereValues
  • Select
  • SelectValues
  • Count
  • Join
  • Max
  • ToMemoryStream
  • AsMemory
  • AsReadOnlyMemory
  • AsArraySegment
  • TryAsSegment
  • ToMemory
  • ToReadOnlyMemory
  • ConvertToString
  • Min
  • As
  • Replace
  • RemoveAll
  • Slice
  • Sum
  • Trim
  • TrimEnd
  • TrimStart
  • ClampStart
  • ClampEnd

License

This project is licensed under the MIT License. See the LICENSE file for details. Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Jakar.Extensions:

Package Downloads
Jakar.Database

Package Description

Jakar.Extensions.Blazor

Extensions to aid in development.

Jakar.Extensions.Serilog

Extensions to aid in development.

Jakar.Shapes

Extensions to aid in development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.17.2 137 9/18/2025
9.17.1 153 9/17/2025
9.17.0 144 9/17/2025
9.16.2 78 9/12/2025
9.16.1 80 9/12/2025
9.16.0 111 9/12/2025 9.16.0 is deprecated because it has critical bugs.
9.15.0 204 8/13/2025 9.15.0 is deprecated because it has critical bugs.
9.14.3 123 7/31/2025
9.14.2 114 7/30/2025
9.14.1 118 7/29/2025
9.14.0 115 7/29/2025
9.13.1 180 7/13/2025
9.13.0 164 7/13/2025
9.12.2 96 7/5/2025
9.12.1 107 7/4/2025
9.12.0 158 7/4/2025
9.11.0 173 6/25/2025
9.10.1 133 6/20/2025
9.10.0 175 6/19/2025
9.8.0 192 5/5/2025
9.7.3 251 4/16/2025
9.7.2 247 4/15/2025
9.7.1 261 4/15/2025
9.7.0 247 4/15/2025
9.6.0 515 3/26/2025
9.5.2 136 3/14/2025
9.5.1 141 3/14/2025
9.5.0 151 3/14/2025
9.4.0 262 3/6/2025
9.3.3 253 3/6/2025
9.3.2 268 3/5/2025
9.3.1 277 3/5/2025
9.3.0 271 3/5/2025
9.2.2 181 2/12/2025
9.2.1 163 2/12/2025
9.2.0 166 2/12/2025
9.1.1 148 1/24/2025
9.1.0 135 1/24/2025
9.0.5 181 1/10/2025
9.0.4 159 1/10/2025
9.0.3 169 12/19/2024
9.0.2 149 12/17/2024
9.0.1 168 12/15/2024
9.0.0 186 11/25/2024
8.13.3 182 9/28/2024
8.13.2 191 9/11/2024
8.13.1 229 9/10/2024
8.13.0 185 9/9/2024
8.12.4 242 8/22/2024
8.12.3 239 7/1/2024
8.12.2 211 6/19/2024
8.12.1 187 6/18/2024
8.12.0 215 6/17/2024
8.11.9 196 6/14/2024
8.11.8 181 6/14/2024
8.11.7 206 6/13/2024
8.11.6 193 6/13/2024
8.11.5 186 6/8/2024
8.11.4 188 6/8/2024
8.11.3 185 6/6/2024
8.11.2 187 5/31/2024
8.11.1 180 5/31/2024
8.11.0 186 5/31/2024
8.10.4 212 5/21/2024
8.10.3 204 5/14/2024
8.10.2 226 5/2/2024
8.10.1 175 5/2/2024
8.10.0 173 5/1/2024
8.9.1 171 5/1/2024
8.9.0 233 4/30/2024
8.8.2 199 4/29/2024
8.8.1 211 4/29/2024
8.8.0 192 4/29/2024
8.7.1 235 4/28/2024
8.7.0 183 4/28/2024
8.6.0 243 4/26/2024
8.5.0 217 4/26/2024
8.4.0 227 4/25/2024
8.3.3 195 4/24/2024
8.3.2 189 4/23/2024
8.3.1 200 4/9/2024
8.3.0 182 4/9/2024
8.2.11 189 4/8/2024
8.2.10 193 4/5/2024
8.2.9 227 4/4/2024
8.2.8 175 4/4/2024
8.2.7 180 4/4/2024
8.2.6 230 4/4/2024
8.2.5 205 4/4/2024
8.2.4 198 4/4/2024
8.2.3 191 4/4/2024
8.2.2 199 4/4/2024
8.2.0 206 4/4/2024
8.1.0 225 4/3/2024
8.0.3 215 4/3/2024
8.0.2 185 4/3/2024
8.0.1 217 4/3/2024
8.0.0 216 4/2/2024
7.7.1 222 4/1/2024
7.7.0 217 4/1/2024
7.6.6 281 2/27/2024
7.6.5 456 1/2/2024
7.6.4 379 1/2/2024
7.6.3 429 1/2/2024
7.6.2 434 12/22/2023
7.6.1 483 12/19/2023
7.6.0 480 12/13/2023
7.5.2 477 12/9/2023 7.5.2 is deprecated because it has critical bugs.
7.5.1 510 12/9/2023 7.5.1 is deprecated because it has critical bugs.
7.5.0 480 12/9/2023 7.5.0 is deprecated because it has critical bugs.
7.4.0 519 12/8/2023 7.4.0 is deprecated because it has critical bugs.
7.3.2 439 12/5/2023 7.3.2 is deprecated because it has critical bugs.
7.3.1 432 12/5/2023 7.3.1 is deprecated because it has critical bugs.
7.3.0 438 12/5/2023 7.3.0 is deprecated because it has critical bugs.
7.2.0 512 12/1/2023 7.2.0 is deprecated because it has critical bugs.
7.1.1 546 11/30/2023 7.1.1 is deprecated because it has critical bugs.
7.1.0 457 11/30/2023 7.1.0 is deprecated because it has critical bugs.
7.0.0 452 11/15/2023
6.9.2 506 11/5/2023
6.9.1 559 10/31/2023
6.9.0 495 10/31/2023
6.8.8 517 10/10/2023
6.8.7 574 10/3/2023
6.8.6 554 9/21/2023
6.8.5 513 9/21/2023
6.8.4 534 9/17/2023
6.8.3 675 8/29/2023
6.8.2 611 8/21/2023
6.8.1 814 7/14/2023
6.8.0 716 6/27/2023
6.7.30 742 6/27/2023
6.7.29 808 5/22/2023
6.7.28 776 5/8/2023
6.7.27 899 5/1/2023
6.7.26 875 5/1/2023 6.7.26 is deprecated because it has critical bugs.
6.7.25 895 5/1/2023 6.7.25 is deprecated because it has critical bugs.
6.7.24 835 4/30/2023
6.7.23 901 4/26/2023
6.7.22 730 4/25/2023
6.7.21 873 4/17/2023
6.7.20 852 3/31/2023
6.7.19 807 3/30/2023
6.7.18 964 3/30/2023
6.7.17 857 3/23/2023
6.7.16 797 3/22/2023
6.7.15 793 3/22/2023
6.7.14 847 3/22/2023
6.7.13 921 3/17/2023
6.7.12 881 3/17/2023
6.7.11 876 3/16/2023
6.7.10 887 3/16/2023
6.7.9 866 3/10/2023
6.7.8 970 3/6/2023
6.7.7 881 3/4/2023
6.7.6 886 3/4/2023
6.7.5 1,119 3/4/2023
6.7.4 899 3/3/2023
6.7.3 1,171 3/3/2023
6.7.2 1,091 3/1/2023
6.7.1 1,157 3/1/2023
6.6.4 1,089 2/15/2023
6.6.3 896 2/15/2023
6.6.2 1,077 2/15/2023
6.6.1 901 2/15/2023
6.6.0 929 2/12/2023
6.5.1 1,242 1/27/2023
6.4.4 1,194 1/21/2023
6.4.3 894 1/21/2023
6.4.2 1,031 12/1/2022
6.4.1 1,049 12/1/2022
6.4.0 1,182 11/21/2022
6.3.2 1,096 11/16/2022
6.3.1 1,035 11/14/2022
6.3.0 1,038 11/14/2022
6.2.2 1,301 11/11/2022
6.2.1 987 11/11/2022
6.2.0 1,074 11/11/2022
6.1.4 1,212 10/17/2022
6.1.3 1,170 10/11/2022
6.1.2 1,088 10/9/2022
6.1.1 1,005 10/6/2022
6.1.0 1,093 10/6/2022
6.0.5 1,145 10/4/2022
6.0.4 1,122 10/1/2022
6.0.3 1,098 9/30/2022
6.0.2 1,241 9/22/2022
6.0.1 1,082 9/22/2022
6.0.0.69-beta 793 9/20/2022
6.0.0.68-beta 826 9/19/2022
6.0.0.67-beta 761 9/19/2022
6.0.0.66-beta 825 9/19/2022
6.0.0.65-beta 806 9/17/2022
6.0.0.64-beta 767 9/16/2022
6.0.0.63-beta 768 9/15/2022
6.0.0.62-beta 859 9/14/2022
6.0.0.61-beta 830 9/14/2022
6.0.0.60-beta 860 9/13/2022
6.0.0.59-beta 903 9/13/2022
6.0.0.58-beta 1,015 9/13/2022
6.0.0.57-beta 759 9/11/2022
6.0.0.56-beta 747 9/11/2022
6.0.0.55-beta 817 9/8/2022
6.0.0.54-beta 792 9/6/2022
6.0.0.53-beta 759 9/5/2022
6.0.0.52-beta 733 9/1/2022
6.0.0.51-beta 776 8/31/2022
6.0.0.50-beta 733 8/30/2022
6.0.0.49-beta 786 8/30/2022
6.0.0.48-beta 787 8/30/2022
6.0.0.47-beta 769 8/29/2022
6.0.0.46-beta 753 8/21/2022
6.0.0.45-beta 767 8/16/2022
6.0.0.44-beta 783 8/15/2022
6.0.0.43-beta 770 8/13/2022
6.0.0.42-beta 782 8/10/2022
6.0.0.41-beta 770 8/5/2022
6.0.0.40-beta 752 8/4/2022
6.0.0.39-beta 739 8/4/2022
6.0.0.38-beta 740 8/3/2022
6.0.0.37-beta 789 8/3/2022
6.0.0.36-beta 689 7/21/2022
6.0.0.35-beta 790 7/12/2022
6.0.0.34-beta 753 7/1/2022
6.0.0.33-beta 759 7/1/2022
6.0.0.32-beta 757 7/1/2022
6.0.0.31-beta 804 7/1/2022
6.0.0.30-beta 824 6/30/2022
6.0.0.29-beta 775 6/24/2022
6.0.0.28-beta 776 6/24/2022
6.0.0.27-beta 732 6/23/2022
6.0.0.26-beta 781 6/22/2022
6.0.0.25-beta 818 6/16/2022
6.0.0.24-beta 790 6/10/2022
6.0.0.23-beta 804 6/9/2022
6.0.0.22-beta 789 6/9/2022
6.0.0.21-beta 776 6/8/2022
6.0.0.17-beta 781 6/1/2022
6.0.0.16-beta 725 5/24/2022
6.0.0.15-beta 701 5/23/2022
6.0.0.14-beta 796 5/19/2022
6.0.0.13-beta 715 5/13/2022
6.0.0.12-beta 718 5/10/2022
6.0.0.7-beta 729 5/10/2022
6.0.0.6-beta 691 4/28/2022
6.0.0.5-beta 754 4/22/2022
6.0.0.4-beta 772 4/21/2022
6.0.0.3-beta 777 4/21/2022
6.0.0.2-beta 777 4/20/2022
6.0.0.1-beta 791 4/20/2022
6.0.0 1,649 9/21/2022
5.9.3 1,320 4/15/2022 5.9.3 is deprecated because it has critical bugs.
5.9.2 1,175 4/15/2022
5.9.1 1,126 4/15/2022
5.9.0 1,168 4/15/2022
5.8.2 1,171 4/12/2022
5.8.1 1,121 4/11/2022
5.8.0 1,425 4/11/2022
5.7.1 1,189 4/8/2022
5.7.0 1,478 4/8/2022
5.6.0 1,191 3/29/2022
5.5.0 1,167 3/28/2022
5.4.0 1,476 3/28/2022
5.3.0 1,418 3/23/2022
5.2.7 1,154 3/21/2022
5.2.5 1,195 3/19/2022
5.2.4 1,120 3/19/2022
5.2.3 1,144 3/18/2022
5.2.2 1,108 3/18/2022
5.2.1 1,130 3/18/2022
5.2.0 1,125 3/17/2022
5.1.2 1,156 3/17/2022
5.1.1 1,185 3/17/2022
5.1.0 1,143 3/16/2022

Bug Fixes