Jakar.Extensions 9.7.3

dotnet add package Jakar.Extensions --version 9.7.3
                    
NuGet\Install-Package Jakar.Extensions -Version 9.7.3
                    
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.7.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jakar.Extensions" Version="9.7.3" />
                    
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.7.3
                    
#r "nuget: Jakar.Extensions, 9.7.3"
                    
#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.
#addin nuget:?package=Jakar.Extensions&version=9.7.3
                    
Install Jakar.Extensions as a Cake Addin
#tool nuget:?package=Jakar.Extensions&version=9.7.3
                    
Install Jakar.Extensions 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.7.3 184 12 days ago
9.7.2 179 12 days ago
9.7.1 178 12 days ago
9.7.0 183 12 days ago
9.6.0 453 a month ago
9.5.2 77 a month ago
9.5.1 78 a month ago
9.5.0 96 a month ago
9.4.0 208 2 months ago
9.3.3 197 2 months ago
9.3.2 205 2 months ago
9.3.1 214 2 months ago
9.3.0 205 2 months ago
9.2.2 114 2 months ago
9.2.1 110 2 months ago
9.2.0 107 2 months ago
9.1.1 80 3 months ago
9.1.0 79 3 months ago
9.0.5 113 4 months ago
9.0.4 96 4 months ago
9.0.3 107 4 months ago
9.0.2 103 4 months ago
9.0.1 110 4 months ago
9.0.0 117 5 months ago
8.13.3 122 7 months ago
8.13.2 142 8 months ago
8.13.1 169 8 months ago
8.13.0 138 8 months ago
8.12.4 172 8 months ago
8.12.3 184 10 months ago
8.12.2 149 6/19/2024
8.12.1 134 6/18/2024
8.12.0 150 6/17/2024
8.11.9 141 6/14/2024
8.11.8 129 6/14/2024
8.11.7 136 6/13/2024
8.11.6 130 6/13/2024
8.11.5 135 6/8/2024
8.11.4 127 6/8/2024
8.11.3 123 6/6/2024
8.11.2 127 5/31/2024
8.11.1 135 5/31/2024
8.11.0 126 5/31/2024
8.10.4 156 5/21/2024
8.10.3 152 5/14/2024
8.10.2 167 5/2/2024
8.10.1 122 5/2/2024
8.10.0 115 5/1/2024
8.9.1 111 5/1/2024
8.9.0 179 4/30/2024
8.8.2 144 4/29/2024
8.8.1 146 4/29/2024
8.8.0 127 4/29/2024
8.7.1 176 4/28/2024
8.7.0 129 4/28/2024
8.6.0 179 4/26/2024
8.5.0 159 4/26/2024
8.4.0 162 4/25/2024
8.3.3 138 4/24/2024
8.3.2 140 4/23/2024
8.3.1 149 4/9/2024
8.3.0 132 4/9/2024
8.2.11 125 4/8/2024
8.2.10 135 4/5/2024
8.2.9 168 4/4/2024
8.2.8 129 4/4/2024
8.2.7 128 4/4/2024
8.2.6 166 4/4/2024
8.2.5 141 4/4/2024
8.2.4 148 4/4/2024
8.2.3 134 4/4/2024
8.2.2 152 4/4/2024
8.2.0 147 4/4/2024
8.1.0 162 4/3/2024
8.0.3 156 4/3/2024
8.0.2 124 4/3/2024
8.0.1 159 4/3/2024
8.0.0 157 4/2/2024
7.7.1 164 4/1/2024
7.7.0 158 4/1/2024
7.6.6 229 2/27/2024
7.6.5 400 1/2/2024
7.6.4 321 1/2/2024
7.6.3 381 1/2/2024
7.6.2 382 12/22/2023
7.6.1 423 12/19/2023
7.6.0 430 12/13/2023
7.5.2 433 12/9/2023 7.5.2 is deprecated because it has critical bugs.
7.5.1 458 12/9/2023 7.5.1 is deprecated because it has critical bugs.
7.5.0 425 12/9/2023 7.5.0 is deprecated because it has critical bugs.
7.4.0 453 12/8/2023 7.4.0 is deprecated because it has critical bugs.
7.3.2 402 12/5/2023 7.3.2 is deprecated because it has critical bugs.
7.3.1 411 12/5/2023 7.3.1 is deprecated because it has critical bugs.
7.3.0 405 12/5/2023 7.3.0 is deprecated because it has critical bugs.
7.2.0 486 12/1/2023 7.2.0 is deprecated because it has critical bugs.
7.1.1 501 11/30/2023 7.1.1 is deprecated because it has critical bugs.
7.1.0 432 11/30/2023 7.1.0 is deprecated because it has critical bugs.
7.0.0 422 11/15/2023
6.9.2 474 11/5/2023
6.9.1 522 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 629 8/29/2023
6.8.2 555 8/21/2023
6.8.1 762 7/14/2023
6.8.0 666 6/27/2023
6.7.30 688 6/27/2023
6.7.29 750 5/22/2023
6.7.28 714 5/8/2023
6.7.27 838 5/1/2023
6.7.26 781 5/1/2023 6.7.26 is deprecated because it has critical bugs.
6.7.25 802 5/1/2023 6.7.25 is deprecated because it has critical bugs.
6.7.24 772 4/30/2023
6.7.23 835 4/26/2023
6.7.22 670 4/25/2023
6.7.21 806 4/17/2023
6.7.20 790 3/31/2023
6.7.19 742 3/30/2023
6.7.18 910 3/30/2023
6.7.17 786 3/23/2023
6.7.16 745 3/22/2023
6.7.15 724 3/22/2023
6.7.14 780 3/22/2023
6.7.13 863 3/17/2023
6.7.12 830 3/17/2023
6.7.11 821 3/16/2023
6.7.10 825 3/16/2023
6.7.9 807 3/10/2023
6.7.8 909 3/6/2023
6.7.7 834 3/4/2023
6.7.6 833 3/4/2023
6.7.5 1,057 3/4/2023
6.7.4 828 3/3/2023
6.7.3 1,116 3/3/2023
6.7.2 1,037 3/1/2023
6.7.1 1,085 3/1/2023
6.6.4 1,028 2/15/2023
6.6.3 836 2/15/2023
6.6.2 1,019 2/15/2023
6.6.1 849 2/15/2023
6.6.0 864 2/12/2023
6.5.1 1,175 1/27/2023
6.4.4 1,135 1/21/2023
6.4.3 832 1/21/2023
6.4.2 965 12/1/2022
6.4.1 982 12/1/2022
6.4.0 1,123 11/21/2022
6.3.2 1,030 11/16/2022
6.3.1 968 11/14/2022
6.3.0 975 11/14/2022
6.2.2 1,241 11/11/2022
6.2.1 937 11/11/2022
6.2.0 1,014 11/11/2022
6.1.4 1,140 10/17/2022
6.1.3 1,106 10/11/2022
6.1.2 1,023 10/9/2022
6.1.1 950 10/6/2022
6.1.0 1,036 10/6/2022
6.0.5 1,081 10/4/2022
6.0.4 1,064 10/1/2022
6.0.3 1,040 9/30/2022
6.0.2 1,188 9/22/2022
6.0.1 1,030 9/22/2022
6.0.0.69-beta 743 9/20/2022
6.0.0.68-beta 763 9/19/2022
6.0.0.67-beta 691 9/19/2022
6.0.0.66-beta 756 9/19/2022
6.0.0.65-beta 747 9/17/2022
6.0.0.64-beta 709 9/16/2022
6.0.0.63-beta 707 9/15/2022
6.0.0.62-beta 798 9/14/2022
6.0.0.61-beta 765 9/14/2022
6.0.0.60-beta 797 9/13/2022
6.0.0.59-beta 853 9/13/2022
6.0.0.58-beta 952 9/13/2022
6.0.0.57-beta 700 9/11/2022
6.0.0.56-beta 680 9/11/2022
6.0.0.55-beta 752 9/8/2022
6.0.0.54-beta 737 9/6/2022
6.0.0.53-beta 693 9/5/2022
6.0.0.52-beta 666 9/1/2022
6.0.0.51-beta 720 8/31/2022
6.0.0.50-beta 674 8/30/2022
6.0.0.49-beta 725 8/30/2022
6.0.0.48-beta 731 8/30/2022
6.0.0.47-beta 700 8/29/2022
6.0.0.46-beta 691 8/21/2022
6.0.0.45-beta 690 8/16/2022
6.0.0.44-beta 719 8/15/2022
6.0.0.43-beta 705 8/13/2022
6.0.0.42-beta 717 8/10/2022
6.0.0.41-beta 709 8/5/2022
6.0.0.40-beta 693 8/4/2022
6.0.0.39-beta 669 8/4/2022
6.0.0.38-beta 680 8/3/2022
6.0.0.37-beta 730 8/3/2022
6.0.0.36-beta 629 7/21/2022
6.0.0.35-beta 740 7/12/2022
6.0.0.34-beta 687 7/1/2022
6.0.0.33-beta 700 7/1/2022
6.0.0.32-beta 695 7/1/2022
6.0.0.31-beta 738 7/1/2022
6.0.0.30-beta 764 6/30/2022
6.0.0.29-beta 700 6/24/2022
6.0.0.28-beta 715 6/24/2022
6.0.0.27-beta 671 6/23/2022
6.0.0.26-beta 722 6/22/2022
6.0.0.25-beta 754 6/16/2022
6.0.0.24-beta 734 6/10/2022
6.0.0.23-beta 732 6/9/2022
6.0.0.22-beta 721 6/9/2022
6.0.0.21-beta 706 6/8/2022
6.0.0.17-beta 714 6/1/2022
6.0.0.16-beta 661 5/24/2022
6.0.0.15-beta 641 5/23/2022
6.0.0.14-beta 726 5/19/2022
6.0.0.13-beta 646 5/13/2022
6.0.0.12-beta 643 5/10/2022
6.0.0.7-beta 662 5/10/2022
6.0.0.6-beta 620 4/28/2022
6.0.0.5-beta 683 4/22/2022
6.0.0.4-beta 701 4/21/2022
6.0.0.3-beta 710 4/21/2022
6.0.0.2-beta 702 4/20/2022
6.0.0.1-beta 726 4/20/2022
6.0.0 1,578 9/21/2022
5.9.3 1,198 4/15/2022 5.9.3 is deprecated because it has critical bugs.
5.9.2 1,096 4/15/2022
5.9.1 1,054 4/15/2022
5.9.0 1,098 4/15/2022
5.8.2 1,097 4/12/2022
5.8.1 1,053 4/11/2022
5.8.0 1,358 4/11/2022
5.7.1 1,114 4/8/2022
5.7.0 1,402 4/8/2022
5.6.0 1,119 3/29/2022
5.5.0 1,093 3/28/2022
5.4.0 1,402 3/28/2022
5.3.0 1,341 3/23/2022
5.2.7 1,082 3/21/2022
5.2.5 1,117 3/19/2022
5.2.4 1,052 3/19/2022
5.2.3 1,066 3/18/2022
5.2.2 1,033 3/18/2022
5.2.1 1,055 3/18/2022
5.2.0 1,047 3/17/2022
5.1.2 1,078 3/17/2022
5.1.1 1,114 3/17/2022
5.1.0 1,064 3/16/2022

Bug Fixes