FieldCache is a good replacement for Lazy<T> for cases when:
First, needed safe record comparison (Equals overriden to true).
Second, when it is more convenient to pass lambda inside the method (e. g. when local fields to be taken into account).
This is a good use example:
public record Person(string FirstName, string LastName)
public string FullName => fullName.GetValue(@this => @this.FirstName + " " + @this.LastName, this);
private FieldCache<string> fullName;
Install-Package FieldCache -Version 1.0.0-alpha.3
dotnet add package FieldCache --version 1.0.0-alpha.3
<PackageReference Include="FieldCache" Version="1.0.0-alpha.3" />
paket add FieldCache --version 1.0.0-alpha.3
#r "nuget: FieldCache, 1.0.0-alpha.3"
// Install FieldCache as a Cake Addin #addin nuget:?package=FieldCache&version=1.0.0-alpha.3&prerelease // Install FieldCache as a Cake Tool #tool nuget:?package=FieldCache&version=1.0.0-alpha.3&prerelease
Bug related to "with" fixed (now instead of boolean holder's references are checked)
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FieldCache:
Enables to work with formulas built in the code or from a string. Computing, derivating, latex rendering, compilation, solving equations and systems of equations analytycally, simplification, and much more. Read more on https://am.angouri.org.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on FieldCache:
Open-source symbolic algebra library for C# and F#. One of the most powerful in .NET