Jakar.Extensions 9.15.0

dotnet add package Jakar.Extensions --version 9.15.0
                    
NuGet\Install-Package Jakar.Extensions -Version 9.15.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.15.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jakar.Extensions" Version="9.15.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.15.0
                    
#r "nuget: Jakar.Extensions, 9.15.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.15.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.15.0
                    
Install as a Cake Addin
#tool nuget:?package=Jakar.Extensions&version=9.15.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.15.0 140 8/13/2025
9.14.3 112 7/31/2025
9.14.2 103 7/30/2025
9.14.1 106 7/29/2025
9.14.0 104 7/29/2025
9.13.1 162 7/13/2025
9.13.0 148 7/13/2025
9.12.2 78 7/5/2025
9.12.1 89 7/4/2025
9.12.0 141 7/4/2025
9.11.0 156 6/25/2025
9.10.1 115 6/20/2025
9.10.0 153 6/19/2025
9.8.0 177 5/5/2025
9.7.3 233 4/16/2025
9.7.2 229 4/15/2025
9.7.1 242 4/15/2025
9.7.0 229 4/15/2025
9.6.0 498 3/26/2025
9.5.2 120 3/14/2025
9.5.1 124 3/14/2025
9.5.0 131 3/14/2025
9.4.0 249 3/6/2025
9.3.3 236 3/6/2025
9.3.2 253 3/5/2025
9.3.1 261 3/5/2025
9.3.0 254 3/5/2025
9.2.2 167 2/12/2025
9.2.1 151 2/12/2025
9.2.0 148 2/12/2025
9.1.1 130 1/24/2025
9.1.0 121 1/24/2025
9.0.5 164 1/10/2025
9.0.4 141 1/10/2025
9.0.3 153 12/19/2024
9.0.2 137 12/17/2024
9.0.1 152 12/15/2024
9.0.0 167 11/25/2024
8.13.3 162 9/28/2024
8.13.2 177 9/11/2024
8.13.1 210 9/10/2024
8.13.0 169 9/9/2024
8.12.4 227 8/22/2024
8.12.3 222 7/1/2024
8.12.2 194 6/19/2024
8.12.1 170 6/18/2024
8.12.0 198 6/17/2024
8.11.9 182 6/14/2024
8.11.8 166 6/14/2024
8.11.7 186 6/13/2024
8.11.6 177 6/13/2024
8.11.5 169 6/8/2024
8.11.4 171 6/8/2024
8.11.3 167 6/6/2024
8.11.2 168 5/31/2024
8.11.1 166 5/31/2024
8.11.0 169 5/31/2024
8.10.4 196 5/21/2024
8.10.3 188 5/14/2024
8.10.2 207 5/2/2024
8.10.1 160 5/2/2024
8.10.0 157 5/1/2024
8.9.1 154 5/1/2024
8.9.0 217 4/30/2024
8.8.2 186 4/29/2024
8.8.1 193 4/29/2024
8.8.0 170 4/29/2024
8.7.1 219 4/28/2024
8.7.0 169 4/28/2024
8.6.0 228 4/26/2024
8.5.0 199 4/26/2024
8.4.0 210 4/25/2024
8.3.3 174 4/24/2024
8.3.2 175 4/23/2024
8.3.1 183 4/9/2024
8.3.0 170 4/9/2024
8.2.11 170 4/8/2024
8.2.10 177 4/5/2024
8.2.9 208 4/4/2024
8.2.8 162 4/4/2024
8.2.7 167 4/4/2024
8.2.6 210 4/4/2024
8.2.5 187 4/4/2024
8.2.4 183 4/4/2024
8.2.3 173 4/4/2024
8.2.2 187 4/4/2024
8.2.0 187 4/4/2024
8.1.0 209 4/3/2024
8.0.3 199 4/3/2024
8.0.2 167 4/3/2024
8.0.1 202 4/3/2024
8.0.0 202 4/2/2024
7.7.1 204 4/1/2024
7.7.0 202 4/1/2024
7.6.6 267 2/27/2024
7.6.5 441 1/2/2024
7.6.4 364 1/2/2024
7.6.3 412 1/2/2024
7.6.2 420 12/22/2023
7.6.1 464 12/19/2023
7.6.0 466 12/13/2023
7.5.2 464 12/9/2023 7.5.2 is deprecated because it has critical bugs.
7.5.1 497 12/9/2023 7.5.1 is deprecated because it has critical bugs.
7.5.0 465 12/9/2023 7.5.0 is deprecated because it has critical bugs.
7.4.0 500 12/8/2023 7.4.0 is deprecated because it has critical bugs.
7.3.2 435 12/5/2023 7.3.2 is deprecated because it has critical bugs.
7.3.1 431 12/5/2023 7.3.1 is deprecated because it has critical bugs.
7.3.0 430 12/5/2023 7.3.0 is deprecated because it has critical bugs.
7.2.0 509 12/1/2023 7.2.0 is deprecated because it has critical bugs.
7.1.1 536 11/30/2023 7.1.1 is deprecated because it has critical bugs.
7.1.0 454 11/30/2023 7.1.0 is deprecated because it has critical bugs.
7.0.0 443 11/15/2023
6.9.2 501 11/5/2023
6.9.1 554 10/31/2023
6.9.0 489 10/31/2023
6.8.8 512 10/10/2023
6.8.7 572 10/3/2023
6.8.6 548 9/21/2023
6.8.5 508 9/21/2023
6.8.4 534 9/17/2023
6.8.3 668 8/29/2023
6.8.2 599 8/21/2023
6.8.1 803 7/14/2023
6.8.0 709 6/27/2023
6.7.30 732 6/27/2023
6.7.29 796 5/22/2023
6.7.28 766 5/8/2023
6.7.27 887 5/1/2023
6.7.26 853 5/1/2023 6.7.26 is deprecated because it has critical bugs.
6.7.25 871 5/1/2023 6.7.25 is deprecated because it has critical bugs.
6.7.24 824 4/30/2023
6.7.23 886 4/26/2023
6.7.22 718 4/25/2023
6.7.21 860 4/17/2023
6.7.20 837 3/31/2023
6.7.19 790 3/30/2023
6.7.18 953 3/30/2023
6.7.17 843 3/23/2023
6.7.16 785 3/22/2023
6.7.15 781 3/22/2023
6.7.14 835 3/22/2023
6.7.13 908 3/17/2023
6.7.12 871 3/17/2023
6.7.11 866 3/16/2023
6.7.10 876 3/16/2023
6.7.9 852 3/10/2023
6.7.8 956 3/6/2023
6.7.7 872 3/4/2023
6.7.6 877 3/4/2023
6.7.5 1,106 3/4/2023
6.7.4 884 3/3/2023
6.7.3 1,160 3/3/2023
6.7.2 1,080 3/1/2023
6.7.1 1,147 3/1/2023
6.6.4 1,076 2/15/2023
6.6.3 885 2/15/2023
6.6.2 1,062 2/15/2023
6.6.1 891 2/15/2023
6.6.0 916 2/12/2023
6.5.1 1,226 1/27/2023
6.4.4 1,183 1/21/2023
6.4.3 877 1/21/2023
6.4.2 1,019 12/1/2022
6.4.1 1,033 12/1/2022
6.4.0 1,171 11/21/2022
6.3.2 1,079 11/16/2022
6.3.1 1,017 11/14/2022
6.3.0 1,021 11/14/2022
6.2.2 1,288 11/11/2022
6.2.1 976 11/11/2022
6.2.0 1,061 11/11/2022
6.1.4 1,196 10/17/2022
6.1.3 1,155 10/11/2022
6.1.2 1,070 10/9/2022
6.1.1 992 10/6/2022
6.1.0 1,081 10/6/2022
6.0.5 1,128 10/4/2022
6.0.4 1,108 10/1/2022
6.0.3 1,081 9/30/2022
6.0.2 1,230 9/22/2022
6.0.1 1,072 9/22/2022
6.0.0.69-beta 781 9/20/2022
6.0.0.68-beta 814 9/19/2022
6.0.0.67-beta 744 9/19/2022
6.0.0.66-beta 811 9/19/2022
6.0.0.65-beta 793 9/17/2022
6.0.0.64-beta 754 9/16/2022
6.0.0.63-beta 753 9/15/2022
6.0.0.62-beta 846 9/14/2022
6.0.0.61-beta 815 9/14/2022
6.0.0.60-beta 845 9/13/2022
6.0.0.59-beta 892 9/13/2022
6.0.0.58-beta 1,003 9/13/2022
6.0.0.57-beta 744 9/11/2022
6.0.0.56-beta 734 9/11/2022
6.0.0.55-beta 802 9/8/2022
6.0.0.54-beta 780 9/6/2022
6.0.0.53-beta 742 9/5/2022
6.0.0.52-beta 718 9/1/2022
6.0.0.51-beta 764 8/31/2022
6.0.0.50-beta 720 8/30/2022
6.0.0.49-beta 771 8/30/2022
6.0.0.48-beta 774 8/30/2022
6.0.0.47-beta 752 8/29/2022
6.0.0.46-beta 737 8/21/2022
6.0.0.45-beta 752 8/16/2022
6.0.0.44-beta 767 8/15/2022
6.0.0.43-beta 756 8/13/2022
6.0.0.42-beta 766 8/10/2022
6.0.0.41-beta 757 8/5/2022
6.0.0.40-beta 737 8/4/2022
6.0.0.39-beta 726 8/4/2022
6.0.0.38-beta 726 8/3/2022
6.0.0.37-beta 774 8/3/2022
6.0.0.36-beta 677 7/21/2022
6.0.0.35-beta 779 7/12/2022
6.0.0.34-beta 740 7/1/2022
6.0.0.33-beta 745 7/1/2022
6.0.0.32-beta 743 7/1/2022
6.0.0.31-beta 791 7/1/2022
6.0.0.30-beta 809 6/30/2022
6.0.0.29-beta 760 6/24/2022
6.0.0.28-beta 763 6/24/2022
6.0.0.27-beta 718 6/23/2022
6.0.0.26-beta 768 6/22/2022
6.0.0.25-beta 804 6/16/2022
6.0.0.24-beta 780 6/10/2022
6.0.0.23-beta 790 6/9/2022
6.0.0.22-beta 775 6/9/2022
6.0.0.21-beta 758 6/8/2022
6.0.0.17-beta 767 6/1/2022
6.0.0.16-beta 710 5/24/2022
6.0.0.15-beta 691 5/23/2022
6.0.0.14-beta 784 5/19/2022
6.0.0.13-beta 699 5/13/2022
6.0.0.12-beta 700 5/10/2022
6.0.0.7-beta 716 5/10/2022
6.0.0.6-beta 679 4/28/2022
6.0.0.5-beta 739 4/22/2022
6.0.0.4-beta 759 4/21/2022
6.0.0.3-beta 763 4/21/2022
6.0.0.2-beta 760 4/20/2022
6.0.0.1-beta 780 4/20/2022
6.0.0 1,634 9/21/2022
5.9.3 1,297 4/15/2022 5.9.3 is deprecated because it has critical bugs.
5.9.2 1,158 4/15/2022
5.9.1 1,112 4/15/2022
5.9.0 1,153 4/15/2022
5.8.2 1,155 4/12/2022
5.8.1 1,110 4/11/2022
5.8.0 1,411 4/11/2022
5.7.1 1,175 4/8/2022
5.7.0 1,464 4/8/2022
5.6.0 1,176 3/29/2022
5.5.0 1,148 3/28/2022
5.4.0 1,462 3/28/2022
5.3.0 1,405 3/23/2022
5.2.7 1,139 3/21/2022
5.2.5 1,181 3/19/2022
5.2.4 1,108 3/19/2022
5.2.3 1,129 3/18/2022
5.2.2 1,091 3/18/2022
5.2.1 1,115 3/18/2022
5.2.0 1,110 3/17/2022
5.1.2 1,142 3/17/2022
5.1.1 1,174 3/17/2022
5.1.0 1,130 3/16/2022

Bug Fixes