Jakar.Extensions 10.5.0

dotnet add package Jakar.Extensions --version 10.5.0
                    
NuGet\Install-Package Jakar.Extensions -Version 10.5.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="10.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jakar.Extensions" Version="10.5.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 10.5.0
                    
#r "nuget: Jakar.Extensions, 10.5.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@10.5.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=10.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Jakar.Extensions&version=10.5.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

  • BaseClass : 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 net10.0 is compatible.  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.Shapes

Extensions to aid in development.

Jakar.Extensions.Serilog

Extensions to aid in development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.5.0 0 2/4/2026
10.4.1 48 2/2/2026
10.4.0 42 2/2/2026
10.3.4 85 1/28/2026
10.3.3 108 1/22/2026
10.3.2 87 1/22/2026
10.3.1 105 1/21/2026 10.3.1 is deprecated because it has critical bugs.
10.3.0 86 1/21/2026
10.2.0 104 1/8/2026
10.1.1 116 12/30/2025
10.1.0 312 12/16/2025
10.0.2 436 12/11/2025
10.0.1 200 11/26/2025
10.0.0 394 11/21/2025
9.19.3 311 11/11/2025
9.19.2 296 11/10/2025
9.19.1 229 10/23/2025
9.19.0 149 10/17/2025
9.18.10 219 10/9/2025
9.18.9 218 10/9/2025
9.18.8 225 10/6/2025
9.18.7 216 10/6/2025
9.18.6 225 10/6/2025
9.18.5 222 10/3/2025
9.18.4 242 9/29/2025
9.18.3 226 9/26/2025
9.18.2 230 9/25/2025
9.18.1 328 9/24/2025
9.18.0 222 9/24/2025
9.17.2 353 9/18/2025
9.17.1 360 9/17/2025
9.17.0 354 9/17/2025
9.16.2 176 9/12/2025
9.16.1 178 9/12/2025
9.16.0 217 9/12/2025 9.16.0 is deprecated because it has critical bugs.
9.15.0 322 8/13/2025 9.15.0 is deprecated because it has critical bugs.
9.14.3 208 7/31/2025
9.14.2 187 7/30/2025
9.14.1 215 7/29/2025
9.14.0 184 7/29/2025
9.13.1 267 7/13/2025
9.13.0 237 7/13/2025
9.12.2 179 7/5/2025
9.12.1 177 7/4/2025
9.12.0 245 7/4/2025
9.11.0 250 6/25/2025
9.10.1 216 6/20/2025
9.10.0 270 6/19/2025
9.8.0 287 5/5/2025
9.7.3 348 4/16/2025
9.7.2 335 4/15/2025
9.7.1 345 4/15/2025
9.7.0 345 4/15/2025
9.6.0 595 3/26/2025
9.5.2 211 3/14/2025
9.5.1 240 3/14/2025
9.5.0 246 3/14/2025
9.4.0 341 3/6/2025
9.3.3 353 3/6/2025
9.3.2 368 3/5/2025
9.3.1 361 3/5/2025
9.3.0 366 3/5/2025
9.2.2 280 2/12/2025
9.2.1 250 2/12/2025
9.2.0 259 2/12/2025
9.1.1 240 1/24/2025
9.1.0 233 1/24/2025
9.0.5 276 1/10/2025
9.0.4 248 1/10/2025
9.0.3 253 12/19/2024
9.0.2 228 12/17/2024
9.0.1 264 12/15/2024
9.0.0 293 11/25/2024
8.13.3 281 9/28/2024
8.13.2 278 9/11/2024
8.13.1 335 9/10/2024
8.13.0 279 9/9/2024
8.12.4 333 8/22/2024
8.12.3 363 7/1/2024
8.12.2 321 6/19/2024
8.12.1 292 6/18/2024
8.12.0 312 6/17/2024
8.11.9 286 6/14/2024
8.11.8 266 6/14/2024
8.11.7 305 6/13/2024
8.11.6 280 6/13/2024
8.11.5 282 6/8/2024
8.11.4 280 6/8/2024
8.11.3 266 6/6/2024
8.11.2 277 5/31/2024
8.11.1 277 5/31/2024
8.11.0 271 5/31/2024
8.10.4 316 5/21/2024
8.10.3 311 5/14/2024
8.10.2 318 5/2/2024
8.10.1 267 5/2/2024
8.10.0 251 5/1/2024
8.9.1 255 5/1/2024
8.9.0 341 4/30/2024
8.8.2 304 4/29/2024
8.8.1 298 4/29/2024
8.8.0 276 4/29/2024
8.7.1 361 4/28/2024
8.7.0 290 4/28/2024
8.6.0 360 4/26/2024
8.5.0 315 4/26/2024
8.4.0 326 4/25/2024
8.3.3 300 4/24/2024
8.3.2 277 4/23/2024
8.3.1 285 4/9/2024
8.3.0 261 4/9/2024
8.2.11 285 4/8/2024
8.2.10 269 4/5/2024
8.2.9 330 4/4/2024
8.2.8 251 4/4/2024
8.2.7 278 4/4/2024
8.2.6 325 4/4/2024
8.2.5 299 4/4/2024
8.2.4 282 4/4/2024
8.2.3 288 4/4/2024
8.2.2 280 4/4/2024
8.2.0 298 4/4/2024
8.1.0 312 4/3/2024
8.0.3 318 4/3/2024
8.0.2 280 4/3/2024
8.0.1 304 4/3/2024
8.0.0 316 4/2/2024
7.7.1 321 4/1/2024
7.7.0 318 4/1/2024
7.6.6 363 2/27/2024
7.6.5 569 1/2/2024
7.6.4 476 1/2/2024
7.6.3 505 1/2/2024
7.6.2 520 12/22/2023
7.6.1 575 12/19/2023
7.6.0 570 12/13/2023
7.5.2 561 12/9/2023 7.5.2 is deprecated because it has critical bugs.
7.5.1 611 12/9/2023 7.5.1 is deprecated because it has critical bugs.
7.5.0 574 12/9/2023 7.5.0 is deprecated because it has critical bugs.
7.4.0 611 12/8/2023 7.4.0 is deprecated because it has critical bugs.
7.3.2 506 12/5/2023 7.3.2 is deprecated because it has critical bugs.
7.3.1 482 12/5/2023 7.3.1 is deprecated because it has critical bugs.
7.3.0 505 12/5/2023 7.3.0 is deprecated because it has critical bugs.
7.2.0 587 12/1/2023 7.2.0 is deprecated because it has critical bugs.
7.1.1 612 11/30/2023 7.1.1 is deprecated because it has critical bugs.
7.1.0 508 11/30/2023 7.1.0 is deprecated because it has critical bugs.
7.0.0 513 11/15/2023
6.9.2 563 11/5/2023
6.9.1 606 10/31/2023
6.9.0 553 10/31/2023
6.8.8 581 10/10/2023
6.8.7 629 10/3/2023
6.8.6 612 9/21/2023
6.8.5 584 9/21/2023
6.8.4 587 9/17/2023
6.8.3 750 8/29/2023
6.8.2 679 8/21/2023
6.8.1 919 7/14/2023
6.8.0 793 6/27/2023
6.7.30 826 6/27/2023
6.7.29 883 5/22/2023
6.7.28 850 5/8/2023
6.7.27 1,057 5/1/2023
6.7.26 965 5/1/2023 6.7.26 is deprecated because it has critical bugs.
6.7.25 1,008 5/1/2023 6.7.25 is deprecated because it has critical bugs.
6.7.24 945 4/30/2023
6.7.23 1,067 4/26/2023
6.7.22 819 4/25/2023
6.7.21 959 4/17/2023
6.7.20 917 3/31/2023
6.7.19 885 3/30/2023
6.7.18 1,077 3/30/2023
6.7.17 943 3/23/2023
6.7.16 866 3/22/2023
6.7.15 854 3/22/2023
6.7.14 918 3/22/2023
6.7.13 1,013 3/17/2023
6.7.12 953 3/17/2023
6.7.11 964 3/16/2023
6.7.10 967 3/16/2023
6.7.9 970 3/10/2023
6.7.8 1,093 3/6/2023
6.7.7 945 3/4/2023
6.7.6 947 3/4/2023
6.7.5 1,285 3/4/2023
6.7.4 973 3/3/2023
6.7.3 1,291 3/3/2023
6.7.2 1,285 3/1/2023
6.7.1 1,293 3/1/2023
6.6.4 1,167 2/15/2023
6.6.3 963 2/15/2023
6.6.2 1,164 2/15/2023
6.6.1 974 2/15/2023
6.6.0 1,001 2/12/2023
6.5.1 1,373 1/27/2023
6.4.4 1,282 1/21/2023
6.4.3 960 1/21/2023
6.4.2 1,119 12/1/2022
6.4.1 1,123 12/1/2022
6.4.0 1,303 11/21/2022
6.3.2 1,201 11/16/2022
6.3.1 1,133 11/14/2022
6.3.0 1,121 11/14/2022
6.2.2 1,408 11/11/2022
6.2.1 1,056 11/11/2022
6.2.0 1,167 11/11/2022
6.1.4 1,371 10/17/2022
6.1.3 1,283 10/11/2022
6.1.2 1,184 10/9/2022
6.1.1 1,083 10/6/2022
6.1.0 1,177 10/6/2022
6.0.5 1,248 10/4/2022
6.0.4 1,222 10/1/2022
6.0.3 1,204 9/30/2022
6.0.2 1,367 9/22/2022
6.0.1 1,148 9/22/2022
6.0.0.69-beta 862 9/20/2022
6.0.0.68-beta 901 9/19/2022
6.0.0.67-beta 847 9/19/2022
6.0.0.66-beta 909 9/19/2022
6.0.0.65-beta 901 9/17/2022
6.0.0.64-beta 858 9/16/2022
6.0.0.63-beta 842 9/15/2022
6.0.0.62-beta 958 9/14/2022
6.0.0.61-beta 921 9/14/2022
6.0.0.60-beta 942 9/13/2022
6.0.0.59-beta 991 9/13/2022
6.0.0.58-beta 1,133 9/13/2022
6.0.0.57-beta 854 9/11/2022
6.0.0.56-beta 829 9/11/2022
6.0.0.55-beta 906 9/8/2022
6.0.0.54-beta 858 9/6/2022
6.0.0.53-beta 850 9/5/2022
6.0.0.52-beta 799 9/1/2022
6.0.0.51-beta 879 8/31/2022
6.0.0.50-beta 815 8/30/2022
6.0.0.49-beta 872 8/30/2022
6.0.0.48-beta 891 8/30/2022
6.0.0.47-beta 876 8/29/2022
6.0.0.46-beta 838 8/21/2022
6.0.0.45-beta 851 8/16/2022
6.0.0.44-beta 866 8/15/2022
6.0.0.43-beta 849 8/13/2022
6.0.0.42-beta 860 8/10/2022
6.0.0.41-beta 847 8/5/2022
6.0.0.40-beta 839 8/4/2022
6.0.0.39-beta 829 8/4/2022
6.0.0.38-beta 818 8/3/2022
6.0.0.37-beta 876 8/3/2022
6.0.0.36-beta 770 7/21/2022
6.0.0.35-beta 866 7/12/2022
6.0.0.34-beta 843 7/1/2022
6.0.0.33-beta 851 7/1/2022
6.0.0.32-beta 834 7/1/2022
6.0.0.31-beta 888 7/1/2022
6.0.0.30-beta 933 6/30/2022
6.0.0.29-beta 844 6/24/2022
6.0.0.28-beta 853 6/24/2022
6.0.0.27-beta 817 6/23/2022
6.0.0.26-beta 858 6/22/2022
6.0.0.25-beta 916 6/16/2022
6.0.0.24-beta 859 6/10/2022
6.0.0.23-beta 897 6/9/2022
6.0.0.22-beta 882 6/9/2022
6.0.0.21-beta 852 6/8/2022
6.0.0.17-beta 865 6/1/2022
6.0.0.16-beta 812 5/24/2022
6.0.0.15-beta 801 5/23/2022
6.0.0.14-beta 874 5/19/2022
6.0.0.13-beta 797 5/13/2022
6.0.0.12-beta 796 5/10/2022
6.0.0.7-beta 813 5/10/2022
6.0.0.6-beta 759 4/28/2022
6.0.0.5-beta 843 4/22/2022
6.0.0.4-beta 853 4/21/2022
6.0.0.3-beta 855 4/21/2022
6.0.0.2-beta 861 4/20/2022
6.0.0.1-beta 866 4/20/2022
6.0.0 1,800 9/21/2022
5.9.3 1,427 4/15/2022 5.9.3 is deprecated because it has critical bugs.
5.9.2 1,259 4/15/2022
5.9.1 1,200 4/15/2022
5.9.0 1,251 4/15/2022
5.8.2 1,264 4/12/2022
5.8.1 1,199 4/11/2022
5.8.0 1,507 4/11/2022
5.7.1 1,269 4/8/2022
5.7.0 1,562 4/8/2022
5.6.0 1,269 3/29/2022
5.5.0 1,247 3/28/2022
5.4.0 1,549 3/28/2022
5.3.0 1,506 3/23/2022
5.2.7 1,231 3/21/2022
5.2.5 1,273 3/19/2022
5.2.4 1,200 3/19/2022
5.2.3 1,232 3/18/2022
5.2.2 1,190 3/18/2022
5.2.1 1,215 3/18/2022
5.2.0 1,211 3/17/2022
5.1.2 1,235 3/17/2022
5.1.1 1,266 3/17/2022
5.1.0 1,232 3/16/2022

Bug Fixes