Sharpify 1.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sharpify --version 1.2.0
NuGet\Install-Package Sharpify -Version 1.2.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="Sharpify" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sharpify --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sharpify, 1.2.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.
// Install Sharpify as a Cake Addin #addin nuget:?package=Sharpify&version=1.2.0 // Install Sharpify as a Cake Tool #tool nuget:?package=Sharpify&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CHANGELOG
- Modifications to
PersistentDictionary
:Upsert
has been renamed toUpsertAsync
to make its nature more obvious (Possible BREAKING change)Upsert
now handles a special case in which the key exists and value is the same as new value, it will completely forgo the operation, requiring noTask
creation and no serialization.GetOrCreateAsync(key, val)
andUpsertAsync(key, val)
now return aValueTask
reducing resource usagePersistentDictionary
now uses a regularDictionary
as the internal data structure to be lighter and handle reads even faster. This is the *BREAKING change as custom inherited types will need to be updated to also serialize and deserialize to a regularDictionary
.- To allow concurrent writes, a very efficient and robust concurrency model using a
ConcurrentQueue
and aSemaphoreSlim
is used. It perfect conditions it will even reduce serialization counts. - The base
Dictionary
is also not nullable anymore, which reduces null checks. - More methods of
PersistentDictionary
that had a base implementation were marked asvirtual
for more customization options with inheritance. - Overloads for
T
types were added to bothGetOrCreateAsync(key, T val)
andUpsertAsync(key, T val)
to make usage even easier for primitive types, and they both rely on thestring
overloads so that inherited types would'nt need to implement both. LocalPersistentDictionary
andLazyLocalPersistentDictionary
were both updated to support this new structure and also now utilize a single internal instance of theJsonOptions
for serialization, thus reducing resource usage in some scenarios.LazyLocalPersistentDictionary
get key implementation was revised and improved to reduce memory allocations.- Edge cases of concurrent writing with
PersistentDictionary
are very hard to detect in unit tests due to inconsistencies in executing upserts in parallel, if you encounter any issues, please post the issue in the repo or email me.
- Added
OpenLink(string url)
function toUtils.Env
that supports opening a link on Windows, Mac, and Linux Result.Message
andResult<T>.Message
is no longer nullable, and instead will default to an empty string.string.GetReference
extension- Added
Result.Fail
overloads that support a value, to allow usage of static defaults or empty collections - Added
HashSet.ToArrayFast()
method which converts a hash set to an array more efficiently than Linq. - Further optimized
AesProvider.GeneratePassword
- BREAKING, The
FormatBytes
function forlong
anddouble
was moved toUtils.Strings
class and is no longer an extension function, this will make the usage clearer. - Further optimized
TimeSpan.Format
- Multiple string creating functions which used to stack allocate the buffers, now rent them instead, potentially reducing overall application memory usage.
- Added another class
Utils.Unsafe
that has "hacky" utilities that allow you to reuse existing code in other high performance apis - New exceptions were added to validate function input in places where the JIT could you use this information to optimize the code by removing bound checks and such.
- BREAKING all of the
ConvertToInt32
methods were removed, an in place a methodTryConvertToInt32(ReadOnlySpan{char}, out int result)
was added, it is more efficient and generic as it can work for signed and unsigned integers by relaying on the bool as the operation status. SortedList<T>
's fields were changed to be protected and not private, this will make inheritance if you so choose, also added an implicit operator that will return the inner list for places which require a list input.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 was computed. 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.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Sharpify:
Package | Downloads |
---|---|
PrettyConsole
High performance, feature rich and easy to use wrap over System.Console |
|
Sharpify.Data
An extension of Sharpify, focused on Data |
|
Sharpify.CommandLineInterface
An extension of Sharpify, focused on creating command line interfaces |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.5.0 | 592 | 11/13/2024 |
2.4.0 | 624 | 10/21/2024 |
2.4.0-alpha | 196 | 10/8/2024 |
2.2.0 | 563 | 7/26/2024 |
2.1.0 | 104 | 7/18/2024 |
2.0.0 | 165 | 6/3/2024 |
1.8.1 | 123 | 5/30/2024 |
1.8.0 | 136 | 4/17/2024 |
1.7.3 | 191 | 1/29/2024 |
1.7.2 | 134 | 1/23/2024 |
1.7.1 | 250 | 1/20/2024 |
1.7.0 | 105 | 1/20/2024 |
1.6.0 | 143 | 1/15/2024 |
1.5.0 | 127 | 1/10/2024 |
1.4.2 | 133 | 1/8/2024 |
1.4.1 | 172 | 1/4/2024 |
1.4.0 | 153 | 1/4/2024 |
1.3.1 | 145 | 12/31/2023 |
1.3.0 | 144 | 12/31/2023 |
1.2.0 | 146 | 12/24/2023 |
1.1.0 | 165 | 12/7/2023 |
1.0.9 | 132 | 12/7/2023 |
1.0.8 | 168 | 11/22/2023 |
1.0.7 | 140 | 9/23/2023 |
1.0.6 | 159 | 8/21/2023 |
1.0.5 | 176 | 5/4/2023 |
1.0.4 | 173 | 4/23/2023 |
1.0.3 | 178 | 4/19/2023 |
1.0.2 | 182 | 4/19/2023 |
1.0.1 | 190 | 4/14/2023 |
1.0.0 | 189 | 4/14/2023 |