Eventualist.Extensions
4.0.0.4
dotnet add package Eventualist.Extensions --version 4.0.0.4
NuGet\Install-Package Eventualist.Extensions -Version 4.0.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="Eventualist.Extensions" Version="4.0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Eventualist.Extensions" Version="4.0.0.4" />
<PackageReference Include="Eventualist.Extensions" />
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 Eventualist.Extensions --version 4.0.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Eventualist.Extensions, 4.0.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.
#:package Eventualist.Extensions@4.0.0.4
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Eventualist.Extensions&version=4.0.0.4
#tool nuget:?package=Eventualist.Extensions&version=4.0.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Eventualist.Extensions
This package contains some small but handy extension methods
A number of simple extensions to bool, and collections. Mainly used for my own website, but you can peruse for your own pleasure.
- Bool: AddNot (transforms a string according to the value of the bool)
- Bool: ToYesOrNo (transforms bool to a yes or no)
- Collection: IsEmpty: returns true if collection is empty
- Collection: IsNotEmpty: returns true if collection is not empty
- Collection Divide: returns a list of sublists of the collections, with a specified maximumlength
In 1.0.0.13
- Memoize, to automatically cache function results. Just apply Memoize() to a Function object to get a memoized version. Caveats: it only works for up to two arguments, and it does not much benefit recursive functions.
In 2.0.0.0
- No new functionality but now compatible with .net 6.0. For compatibility with older versions use 1.0.0.19</Description>
In 2.0.0.9
- Added new functionality for Memoize: up to six arguments are now supported
In 2.0.0.15
- Updated to .NET 7. Added extra unit tests and null safety checks
In 3.0.0.9
- Update to .NET 8
In 3.0.0.17
- Added the
MustComeBefore
attribute to make sure dates in your model are always in the right order.
In 4.0.0.0
- Updated to .NET 9.0
- Added the
MustComeBefore
attribute to make sure dates in your model are always in the right order. This is useful for validating that a start date comes before an end date, for example. - Updated the
ExtendedDictionary
to make it more performant and thread-safe. - The
ConvertToMimeType
now handles a greater range of possibilities. - The
HasCorrectExtension
method has been improved to handle more file types and extensions. - The
Titleize
method has been improved to handle more edge cases and provide better title formatting. - So has the
Abbreviate
method, which now handles more complex cases and provides better abbreviation results. - The
Truncate
has been added which does not respect word boundaries, allowing for more precise truncation of strings. - A
StripHtml
method has been added to remove HTML tags from strings, making it easier to work with plain text. - Plus three small utility methods.
An example use of this would be:
internal class TimePeriod
{
[MustComeBefore("EndDate")]
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
}
This attribute works with the standard .NET validators.
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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.