Jakar.Extensions 9.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Jakar.Extensions --version 9.0.4                
NuGet\Install-Package Jakar.Extensions -Version 9.0.4                
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.0.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jakar.Extensions --version 9.0.4                
#r "nuget: Jakar.Extensions, 9.0.4"                
#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.
// Install Jakar.Extensions as a Cake Addin
#addin nuget:?package=Jakar.Extensions&version=9.0.4

// Install Jakar.Extensions as a Cake Tool
#tool nuget:?package=Jakar.Extensions&version=9.0.4                

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.txt 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 net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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.0.5 16 1/10/2025
9.0.4 29 1/10/2025
9.0.3 87 12/19/2024
9.0.2 86 12/17/2024
9.0.1 89 12/15/2024
9.0.0 107 11/25/2024
8.13.3 109 9/28/2024
8.13.2 136 9/11/2024
8.13.1 161 9/10/2024
8.13.0 131 9/9/2024
8.12.4 165 8/22/2024
8.12.3 176 7/1/2024
8.12.2 141 6/19/2024
8.12.1 128 6/18/2024
8.12.0 145 6/17/2024
8.11.9 135 6/14/2024
8.11.8 123 6/14/2024
8.11.7 129 6/13/2024
8.11.6 124 6/13/2024
8.11.5 128 6/8/2024
8.11.4 122 6/8/2024
8.11.3 118 6/6/2024
8.11.2 121 5/31/2024
8.11.1 129 5/31/2024
8.11.0 120 5/31/2024
8.10.4 148 5/21/2024
8.10.3 145 5/14/2024
8.10.2 154 5/2/2024
8.10.1 115 5/2/2024
8.10.0 108 5/1/2024
8.9.1 102 5/1/2024
8.9.0 170 4/30/2024
8.8.2 139 4/29/2024
8.8.1 140 4/29/2024
8.8.0 120 4/29/2024
8.7.1 166 4/28/2024
8.7.0 122 4/28/2024
8.6.0 174 4/26/2024
8.5.0 151 4/26/2024
8.4.0 153 4/25/2024
8.3.3 133 4/24/2024
8.3.2 133 4/23/2024
8.3.1 143 4/9/2024
8.3.0 126 4/9/2024
8.2.11 117 4/8/2024
8.2.10 128 4/5/2024
8.2.9 161 4/4/2024
8.2.8 123 4/4/2024
8.2.7 121 4/4/2024
8.2.6 155 4/4/2024
8.2.5 132 4/4/2024
8.2.4 142 4/4/2024
8.2.3 128 4/4/2024
8.2.2 146 4/4/2024
8.2.0 138 4/4/2024
8.1.0 151 4/3/2024
8.0.3 149 4/3/2024
8.0.2 118 4/3/2024
8.0.1 147 4/3/2024
8.0.0 152 4/2/2024
7.7.1 158 4/1/2024
7.7.0 152 4/1/2024
7.6.6 223 2/27/2024
7.6.5 392 1/2/2024
7.6.4 313 1/2/2024
7.6.3 374 1/2/2024
7.6.2 375 12/22/2023
7.6.1 417 12/19/2023
7.6.0 425 12/13/2023
7.5.2 427 12/9/2023 7.5.2 is deprecated because it has critical bugs.
7.5.1 447 12/9/2023 7.5.1 is deprecated because it has critical bugs.
7.5.0 419 12/9/2023 7.5.0 is deprecated because it has critical bugs.
7.4.0 447 12/8/2023 7.4.0 is deprecated because it has critical bugs.
7.3.2 400 12/5/2023 7.3.2 is deprecated because it has critical bugs.
7.3.1 409 12/5/2023 7.3.1 is deprecated because it has critical bugs.
7.3.0 403 12/5/2023 7.3.0 is deprecated because it has critical bugs.
7.2.0 485 12/1/2023 7.2.0 is deprecated because it has critical bugs.
7.1.1 498 11/30/2023 7.1.1 is deprecated because it has critical bugs.
7.1.0 429 11/30/2023 7.1.0 is deprecated because it has critical bugs.
7.0.0 420 11/15/2023
6.9.2 472 11/5/2023
6.9.1 520 10/31/2023
6.9.0 457 10/31/2023
6.8.8 479 10/10/2023
6.8.7 530 10/3/2023
6.8.6 514 9/21/2023
6.8.5 472 9/21/2023
6.8.4 508 9/17/2023
6.8.3 626 8/29/2023
6.8.2 553 8/21/2023
6.8.1 758 7/14/2023
6.8.0 663 6/27/2023
6.7.30 685 6/27/2023
6.7.29 742 5/22/2023
6.7.28 703 5/8/2023
6.7.27 826 5/1/2023
6.7.26 763 5/1/2023 6.7.26 is deprecated because it has critical bugs.
6.7.25 785 5/1/2023 6.7.25 is deprecated because it has critical bugs.
6.7.24 763 4/30/2023
6.7.23 816 4/26/2023
6.7.22 662 4/25/2023
6.7.21 796 4/17/2023
6.7.20 782 3/31/2023
6.7.19 733 3/30/2023
6.7.18 900 3/30/2023
6.7.17 777 3/23/2023
6.7.16 735 3/22/2023
6.7.15 713 3/22/2023
6.7.14 771 3/22/2023
6.7.13 851 3/17/2023
6.7.12 815 3/17/2023
6.7.11 809 3/16/2023
6.7.10 812 3/16/2023
6.7.9 798 3/10/2023
6.7.8 897 3/6/2023
6.7.7 823 3/4/2023
6.7.6 823 3/4/2023
6.7.5 1,047 3/4/2023
6.7.4 819 3/3/2023
6.7.3 1,107 3/3/2023
6.7.2 1,018 3/1/2023
6.7.1 1,077 3/1/2023
6.6.4 1,017 2/15/2023
6.6.3 825 2/15/2023
6.6.2 1,008 2/15/2023
6.6.1 840 2/15/2023
6.6.0 853 2/12/2023
6.5.1 1,159 1/27/2023
6.4.4 1,125 1/21/2023
6.4.3 821 1/21/2023
6.4.2 951 12/1/2022
6.4.1 971 12/1/2022
6.4.0 1,111 11/21/2022
6.3.2 1,014 11/16/2022
6.3.1 956 11/14/2022
6.3.0 962 11/14/2022
6.2.2 1,227 11/11/2022
6.2.1 924 11/11/2022
6.2.0 1,001 11/11/2022
6.1.4 1,126 10/17/2022
6.1.3 1,093 10/11/2022
6.1.2 1,011 10/9/2022
6.1.1 932 10/6/2022
6.1.0 1,024 10/6/2022
6.0.5 1,068 10/4/2022
6.0.4 1,051 10/1/2022
6.0.3 1,026 9/30/2022
6.0.2 1,174 9/22/2022
6.0.1 1,017 9/22/2022
6.0.0.69-beta 729 9/20/2022
6.0.0.68-beta 750 9/19/2022
6.0.0.67-beta 678 9/19/2022
6.0.0.66-beta 741 9/19/2022
6.0.0.65-beta 731 9/17/2022
6.0.0.64-beta 696 9/16/2022
6.0.0.63-beta 692 9/15/2022
6.0.0.62-beta 781 9/14/2022
6.0.0.61-beta 751 9/14/2022
6.0.0.60-beta 784 9/13/2022
6.0.0.59-beta 838 9/13/2022
6.0.0.58-beta 933 9/13/2022
6.0.0.57-beta 684 9/11/2022
6.0.0.56-beta 668 9/11/2022
6.0.0.55-beta 736 9/8/2022
6.0.0.54-beta 722 9/6/2022
6.0.0.53-beta 678 9/5/2022
6.0.0.52-beta 651 9/1/2022
6.0.0.51-beta 707 8/31/2022
6.0.0.50-beta 659 8/30/2022
6.0.0.49-beta 710 8/30/2022
6.0.0.48-beta 714 8/30/2022
6.0.0.47-beta 685 8/29/2022
6.0.0.46-beta 675 8/21/2022
6.0.0.45-beta 675 8/16/2022
6.0.0.44-beta 706 8/15/2022
6.0.0.43-beta 690 8/13/2022
6.0.0.42-beta 701 8/10/2022
6.0.0.41-beta 695 8/5/2022
6.0.0.40-beta 679 8/4/2022
6.0.0.39-beta 655 8/4/2022
6.0.0.38-beta 666 8/3/2022
6.0.0.37-beta 715 8/3/2022
6.0.0.36-beta 615 7/21/2022
6.0.0.35-beta 726 7/12/2022
6.0.0.34-beta 671 7/1/2022
6.0.0.33-beta 685 7/1/2022
6.0.0.32-beta 678 7/1/2022
6.0.0.31-beta 723 7/1/2022
6.0.0.30-beta 749 6/30/2022
6.0.0.29-beta 685 6/24/2022
6.0.0.28-beta 700 6/24/2022
6.0.0.27-beta 657 6/23/2022
6.0.0.26-beta 706 6/22/2022
6.0.0.25-beta 740 6/16/2022
6.0.0.24-beta 720 6/10/2022
6.0.0.23-beta 717 6/9/2022
6.0.0.22-beta 705 6/9/2022
6.0.0.21-beta 690 6/8/2022
6.0.0.17-beta 699 6/1/2022
6.0.0.16-beta 645 5/24/2022
6.0.0.15-beta 622 5/23/2022
6.0.0.14-beta 711 5/19/2022
6.0.0.13-beta 631 5/13/2022
6.0.0.12-beta 626 5/10/2022
6.0.0.7-beta 646 5/10/2022
6.0.0.6-beta 601 4/28/2022
6.0.0.5-beta 667 4/22/2022
6.0.0.4-beta 684 4/21/2022
6.0.0.3-beta 694 4/21/2022
6.0.0.2-beta 685 4/20/2022
6.0.0.1-beta 709 4/20/2022
6.0.0 1,565 9/21/2022
5.9.3 1,167 4/15/2022 5.9.3 is deprecated because it has critical bugs.
5.9.2 1,078 4/15/2022
5.9.1 1,036 4/15/2022
5.9.0 1,080 4/15/2022
5.8.2 1,076 4/12/2022
5.8.1 1,034 4/11/2022
5.8.0 1,338 4/11/2022
5.7.1 1,097 4/8/2022
5.7.0 1,386 4/8/2022
5.6.0 1,100 3/29/2022
5.5.0 1,076 3/28/2022
5.4.0 1,385 3/28/2022
5.3.0 1,322 3/23/2022
5.2.7 1,066 3/21/2022
5.2.5 1,099 3/19/2022
5.2.4 1,034 3/19/2022
5.2.3 1,047 3/18/2022
5.2.2 1,014 3/18/2022
5.2.1 1,039 3/18/2022
5.2.0 1,026 3/17/2022
5.1.2 1,062 3/17/2022
5.1.1 1,098 3/17/2022
5.1.0 1,046 3/16/2022

Bug Fixes