Jakar.Extensions
9.5.2
dotnet add package Jakar.Extensions --version 9.5.2
NuGet\Install-Package Jakar.Extensions -Version 9.5.2
<PackageReference Include="Jakar.Extensions" Version="9.5.2" />
paket add Jakar.Extensions --version 9.5.2
#r "nuget: Jakar.Extensions, 9.5.2"
// Install Jakar.Extensions as a Cake Addin #addin nuget:?package=Jakar.Extensions&version=9.5.2 // Install Jakar.Extensions as a Cake Tool #tool nuget:?package=Jakar.Extensions&version=9.5.2
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 theINotifyPropertyChanged
andINotifyPropertyChanging
interface.ObservableRecord
: A base record that implements theINotifyPropertyChanged
andINotifyPropertyChanging
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 forSystem.Net.Http.HttpClient
that simplifies the process of making HTTP requests and accepts anIHostInfo
object to provide the base Uri. Also supports automatic retries.WebHandler
: An intermediate class that provides a way to handle the response from theWebRequester
class.WebResponse
: The representation of the response from theWebRequester
class.Status
: An enumration of the possible HTTP status codes.MimeType
: An enumeration of the possible MIME types.MimeTypeNames
: The equivalent string representation of theMimeType
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
andIDataProtectorProvider
: 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 | Versions 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. |
-
net9.0
- AsyncAwaitBestPractices (>= 9.0.0)
- CommunityToolkit.Diagnostics (>= 8.4.0)
- JetBrains.Annotations (>= 2024.3.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.13.0)
- Microsoft.CSharp (>= 4.7.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.3)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Http (>= 9.0.3)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.3)
- Microsoft.Extensions.Options (>= 9.0.3)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.6.1)
- Newtonsoft.Json (>= 13.0.3)
- Nito.Collections.Deque (>= 1.2.1)
- NoAlloq (>= 0.2.0)
- OneOf (>= 3.0.271)
- OneOf.Extended (>= 3.0.271)
- OneOf.SourceGenerator (>= 3.0.271)
- Otp.NET (>= 1.4.0)
- Portable.BouncyCastle (>= 1.9.0)
- System.Collections.Immutable (>= 9.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IO.Hashing (>= 9.0.3)
- System.Net.Http (>= 4.3.4)
- System.Text.Encoding.CodePages (>= 9.0.3)
- System.Text.Encodings.Web (>= 9.0.3)
- System.Text.RegularExpressions (>= 4.3.1)
- System.Threading.Tasks (>= 4.3.0)
- System.Threading.Tasks.Dataflow (>= 9.0.3)
- System.Threading.Tasks.Extensions (>= 4.6.0)
- System.Threading.Tasks.Parallel (>= 4.3.0)
- System.Threading.ThreadPool (>= 4.3.0)
- ValueOf (>= 2.0.31)
- ZXing.Net (>= 0.16.10)
NuGet packages (3)
Showing the top 3 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. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
9.5.2 | 63 | 3/14/2025 | |
9.5.1 | 63 | 3/14/2025 | |
9.5.0 | 84 | 3/14/2025 | |
9.4.0 | 195 | 3/6/2025 | |
9.3.3 | 187 | 3/6/2025 | |
9.3.2 | 195 | 3/5/2025 | |
9.3.1 | 205 | 3/5/2025 | |
9.3.0 | 195 | 3/5/2025 | |
9.2.2 | 102 | 2/12/2025 | |
9.2.1 | 97 | 2/12/2025 | |
9.2.0 | 97 | 2/12/2025 | |
9.1.1 | 71 | 1/24/2025 | |
9.1.0 | 70 | 1/24/2025 | |
9.0.5 | 104 | 1/10/2025 | |
9.0.4 | 85 | 1/10/2025 | |
9.0.3 | 98 | 12/19/2024 | |
9.0.2 | 95 | 12/17/2024 | |
9.0.1 | 97 | 12/15/2024 | |
9.0.0 | 109 | 11/25/2024 | |
8.13.3 | 114 | 9/28/2024 | |
8.13.2 | 136 | 9/11/2024 | |
8.13.1 | 163 | 9/10/2024 | |
8.13.0 | 133 | 9/9/2024 | |
8.12.4 | 165 | 8/22/2024 | |
8.12.3 | 179 | 7/1/2024 | |
8.12.2 | 142 | 6/19/2024 | |
8.12.1 | 129 | 6/18/2024 | |
8.12.0 | 146 | 6/17/2024 | |
8.11.9 | 137 | 6/14/2024 | |
8.11.8 | 124 | 6/14/2024 | |
8.11.7 | 132 | 6/13/2024 | |
8.11.6 | 125 | 6/13/2024 | |
8.11.5 | 131 | 6/8/2024 | |
8.11.4 | 123 | 6/8/2024 | |
8.11.3 | 119 | 6/6/2024 | |
8.11.2 | 122 | 5/31/2024 | |
8.11.1 | 130 | 5/31/2024 | |
8.11.0 | 122 | 5/31/2024 | |
8.10.4 | 152 | 5/21/2024 | |
8.10.3 | 148 | 5/14/2024 | |
8.10.2 | 162 | 5/2/2024 | |
8.10.1 | 118 | 5/2/2024 | |
8.10.0 | 111 | 5/1/2024 | |
8.9.1 | 107 | 5/1/2024 | |
8.9.0 | 175 | 4/30/2024 | |
8.8.2 | 140 | 4/29/2024 | |
8.8.1 | 141 | 4/29/2024 | |
8.8.0 | 123 | 4/29/2024 | |
8.7.1 | 167 | 4/28/2024 | |
8.7.0 | 125 | 4/28/2024 | |
8.6.0 | 175 | 4/26/2024 | |
8.5.0 | 154 | 4/26/2024 | |
8.4.0 | 158 | 4/25/2024 | |
8.3.3 | 134 | 4/24/2024 | |
8.3.2 | 135 | 4/23/2024 | |
8.3.1 | 144 | 4/9/2024 | |
8.3.0 | 127 | 4/9/2024 | |
8.2.11 | 120 | 4/8/2024 | |
8.2.10 | 131 | 4/5/2024 | |
8.2.9 | 163 | 4/4/2024 | |
8.2.8 | 125 | 4/4/2024 | |
8.2.7 | 123 | 4/4/2024 | |
8.2.6 | 160 | 4/4/2024 | |
8.2.5 | 136 | 4/4/2024 | |
8.2.4 | 144 | 4/4/2024 | |
8.2.3 | 130 | 4/4/2024 | |
8.2.2 | 148 | 4/4/2024 | |
8.2.0 | 142 | 4/4/2024 | |
8.1.0 | 158 | 4/3/2024 | |
8.0.3 | 151 | 4/3/2024 | |
8.0.2 | 119 | 4/3/2024 | |
8.0.1 | 154 | 4/3/2024 | |
8.0.0 | 153 | 4/2/2024 | |
7.7.1 | 159 | 4/1/2024 | |
7.7.0 | 153 | 4/1/2024 | |
7.6.6 | 224 | 2/27/2024 | |
7.6.5 | 395 | 1/2/2024 | |
7.6.4 | 316 | 1/2/2024 | |
7.6.3 | 377 | 1/2/2024 | |
7.6.2 | 376 | 12/22/2023 | |
7.6.1 | 418 | 12/19/2023 | |
7.6.0 | 426 | 12/13/2023 | |
7.5.2 | 428 | 12/9/2023 | |
7.5.1 | 453 | 12/9/2023 | |
7.5.0 | 420 | 12/9/2023 | |
7.4.0 | 448 | 12/8/2023 | |
7.3.2 | 401 | 12/5/2023 | |
7.3.1 | 410 | 12/5/2023 | |
7.3.0 | 404 | 12/5/2023 | |
7.2.0 | 486 | 12/1/2023 | |
7.1.1 | 499 | 11/30/2023 | |
7.1.0 | 430 | 11/30/2023 | |
7.0.0 | 422 | 11/15/2023 | |
6.9.2 | 474 | 11/5/2023 | |
6.9.1 | 521 | 10/31/2023 | |
6.9.0 | 458 | 10/31/2023 | |
6.8.8 | 480 | 10/10/2023 | |
6.8.7 | 532 | 10/3/2023 | |
6.8.6 | 518 | 9/21/2023 | |
6.8.5 | 477 | 9/21/2023 | |
6.8.4 | 510 | 9/17/2023 | |
6.8.3 | 628 | 8/29/2023 | |
6.8.2 | 554 | 8/21/2023 | |
6.8.1 | 760 | 7/14/2023 | |
6.8.0 | 664 | 6/27/2023 | |
6.7.30 | 686 | 6/27/2023 | |
6.7.29 | 747 | 5/22/2023 | |
6.7.28 | 711 | 5/8/2023 | |
6.7.27 | 835 | 5/1/2023 | |
6.7.26 | 775 | 5/1/2023 | |
6.7.25 | 796 | 5/1/2023 | |
6.7.24 | 769 | 4/30/2023 | |
6.7.23 | 822 | 4/26/2023 | |
6.7.22 | 667 | 4/25/2023 | |
6.7.21 | 803 | 4/17/2023 | |
6.7.20 | 787 | 3/31/2023 | |
6.7.19 | 739 | 3/30/2023 | |
6.7.18 | 907 | 3/30/2023 | |
6.7.17 | 783 | 3/23/2023 | |
6.7.16 | 742 | 3/22/2023 | |
6.7.15 | 721 | 3/22/2023 | |
6.7.14 | 777 | 3/22/2023 | |
6.7.13 | 860 | 3/17/2023 | |
6.7.12 | 827 | 3/17/2023 | |
6.7.11 | 818 | 3/16/2023 | |
6.7.10 | 822 | 3/16/2023 | |
6.7.9 | 804 | 3/10/2023 | |
6.7.8 | 905 | 3/6/2023 | |
6.7.7 | 830 | 3/4/2023 | |
6.7.6 | 830 | 3/4/2023 | |
6.7.5 | 1,054 | 3/4/2023 | |
6.7.4 | 825 | 3/3/2023 | |
6.7.3 | 1,113 | 3/3/2023 | |
6.7.2 | 1,024 | 3/1/2023 | |
6.7.1 | 1,082 | 3/1/2023 | |
6.6.4 | 1,025 | 2/15/2023 | |
6.6.3 | 832 | 2/15/2023 | |
6.6.2 | 1,016 | 2/15/2023 | |
6.6.1 | 846 | 2/15/2023 | |
6.6.0 | 861 | 2/12/2023 | |
6.5.1 | 1,170 | 1/27/2023 | |
6.4.4 | 1,131 | 1/21/2023 | |
6.4.3 | 827 | 1/21/2023 | |
6.4.2 | 961 | 12/1/2022 | |
6.4.1 | 978 | 12/1/2022 | |
6.4.0 | 1,119 | 11/21/2022 | |
6.3.2 | 1,021 | 11/16/2022 | |
6.3.1 | 964 | 11/14/2022 | |
6.3.0 | 971 | 11/14/2022 | |
6.2.2 | 1,236 | 11/11/2022 | |
6.2.1 | 933 | 11/11/2022 | |
6.2.0 | 1,010 | 11/11/2022 | |
6.1.4 | 1,135 | 10/17/2022 | |
6.1.3 | 1,101 | 10/11/2022 | |
6.1.2 | 1,018 | 10/9/2022 | |
6.1.1 | 945 | 10/6/2022 | |
6.1.0 | 1,031 | 10/6/2022 | |
6.0.5 | 1,075 | 10/4/2022 | |
6.0.4 | 1,059 | 10/1/2022 | |
6.0.3 | 1,034 | 9/30/2022 | |
6.0.2 | 1,183 | 9/22/2022 | |
6.0.1 | 1,025 | 9/22/2022 | |
6.0.0.69-beta | 737 | 9/20/2022 | |
6.0.0.68-beta | 758 | 9/19/2022 | |
6.0.0.67-beta | 686 | 9/19/2022 | |
6.0.0.66-beta | 751 | 9/19/2022 | |
6.0.0.65-beta | 741 | 9/17/2022 | |
6.0.0.64-beta | 704 | 9/16/2022 | |
6.0.0.63-beta | 701 | 9/15/2022 | |
6.0.0.62-beta | 791 | 9/14/2022 | |
6.0.0.61-beta | 759 | 9/14/2022 | |
6.0.0.60-beta | 792 | 9/13/2022 | |
6.0.0.59-beta | 848 | 9/13/2022 | |
6.0.0.58-beta | 947 | 9/13/2022 | |
6.0.0.57-beta | 692 | 9/11/2022 | |
6.0.0.56-beta | 675 | 9/11/2022 | |
6.0.0.55-beta | 747 | 9/8/2022 | |
6.0.0.54-beta | 732 | 9/6/2022 | |
6.0.0.53-beta | 688 | 9/5/2022 | |
6.0.0.52-beta | 661 | 9/1/2022 | |
6.0.0.51-beta | 715 | 8/31/2022 | |
6.0.0.50-beta | 669 | 8/30/2022 | |
6.0.0.49-beta | 720 | 8/30/2022 | |
6.0.0.48-beta | 726 | 8/30/2022 | |
6.0.0.47-beta | 693 | 8/29/2022 | |
6.0.0.46-beta | 686 | 8/21/2022 | |
6.0.0.45-beta | 685 | 8/16/2022 | |
6.0.0.44-beta | 714 | 8/15/2022 | |
6.0.0.43-beta | 699 | 8/13/2022 | |
6.0.0.42-beta | 712 | 8/10/2022 | |
6.0.0.41-beta | 704 | 8/5/2022 | |
6.0.0.40-beta | 687 | 8/4/2022 | |
6.0.0.39-beta | 663 | 8/4/2022 | |
6.0.0.38-beta | 674 | 8/3/2022 | |
6.0.0.37-beta | 724 | 8/3/2022 | |
6.0.0.36-beta | 623 | 7/21/2022 | |
6.0.0.35-beta | 734 | 7/12/2022 | |
6.0.0.34-beta | 681 | 7/1/2022 | |
6.0.0.33-beta | 693 | 7/1/2022 | |
6.0.0.32-beta | 689 | 7/1/2022 | |
6.0.0.31-beta | 732 | 7/1/2022 | |
6.0.0.30-beta | 757 | 6/30/2022 | |
6.0.0.29-beta | 693 | 6/24/2022 | |
6.0.0.28-beta | 708 | 6/24/2022 | |
6.0.0.27-beta | 665 | 6/23/2022 | |
6.0.0.26-beta | 716 | 6/22/2022 | |
6.0.0.25-beta | 748 | 6/16/2022 | |
6.0.0.24-beta | 728 | 6/10/2022 | |
6.0.0.23-beta | 726 | 6/9/2022 | |
6.0.0.22-beta | 715 | 6/9/2022 | |
6.0.0.21-beta | 700 | 6/8/2022 | |
6.0.0.17-beta | 707 | 6/1/2022 | |
6.0.0.16-beta | 655 | 5/24/2022 | |
6.0.0.15-beta | 634 | 5/23/2022 | |
6.0.0.14-beta | 720 | 5/19/2022 | |
6.0.0.13-beta | 640 | 5/13/2022 | |
6.0.0.12-beta | 637 | 5/10/2022 | |
6.0.0.7-beta | 656 | 5/10/2022 | |
6.0.0.6-beta | 614 | 4/28/2022 | |
6.0.0.5-beta | 677 | 4/22/2022 | |
6.0.0.4-beta | 695 | 4/21/2022 | |
6.0.0.3-beta | 704 | 4/21/2022 | |
6.0.0.2-beta | 696 | 4/20/2022 | |
6.0.0.1-beta | 719 | 4/20/2022 | |
6.0.0 | 1,573 | 9/21/2022 | |
5.9.3 | 1,186 | 4/15/2022 | |
5.9.2 | 1,090 | 4/15/2022 | |
5.9.1 | 1,048 | 4/15/2022 | |
5.9.0 | 1,092 | 4/15/2022 | |
5.8.2 | 1,090 | 4/12/2022 | |
5.8.1 | 1,047 | 4/11/2022 | |
5.8.0 | 1,352 | 4/11/2022 | |
5.7.1 | 1,108 | 4/8/2022 | |
5.7.0 | 1,396 | 4/8/2022 | |
5.6.0 | 1,113 | 3/29/2022 | |
5.5.0 | 1,087 | 3/28/2022 | |
5.4.0 | 1,396 | 3/28/2022 | |
5.3.0 | 1,335 | 3/23/2022 | |
5.2.7 | 1,076 | 3/21/2022 | |
5.2.5 | 1,111 | 3/19/2022 | |
5.2.4 | 1,046 | 3/19/2022 | |
5.2.3 | 1,060 | 3/18/2022 | |
5.2.2 | 1,027 | 3/18/2022 | |
5.2.1 | 1,049 | 3/18/2022 | |
5.2.0 | 1,040 | 3/17/2022 | |
5.1.2 | 1,072 | 3/17/2022 | |
5.1.1 | 1,108 | 3/17/2022 | |
5.1.0 | 1,058 | 3/16/2022 |
Bug Fixes