Fermion.Extensions
1.0.0
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Fermion.Extensions --version 1.0.0
NuGet\Install-Package Fermion.Extensions -Version 1.0.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="Fermion.Extensions" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fermion.Extensions" Version="1.0.0" />
<PackageReference Include="Fermion.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 Fermion.Extensions --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Fermion.Extensions, 1.0.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.
#:package Fermion.Extensions@1.0.0
#: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=Fermion.Extensions&version=1.0.0
#tool nuget:?package=Fermion.Extensions&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Fermion.Domain.Extensions
Fermion.Extensions is a library containing helper extension methods for use in the domain layer.
Features
- Collection extensions
- String extensions
- DateTime extensions
- Object extensions
- LINQ extensions
- HTTP Context extensions
- Service Collection extensions
- File extensions
- JSON extensions
- Claims extensions
Installation
dotnet add package Fermion.Extensions
Content
Collection Extensions
AddRange<T>: Adds multiple items to collectionRemoveRange<T>: Removes multiple items from collectionIsNullOrEmpty<T>: Checks if collection is null or emptyHasItems<T>: Checks if collection has any itemsDistinctBy<T>: Returns distinct elements by specified propertyForEach<T>: Performs action on each element
String Extensions
IsNullOrEmpty: Checks if string is null or emptyHasValue: Checks if string has valueToTitleCase: Converts string to title caseToSlug: Converts string to URL-friendly slugTruncate: Truncates string to specified lengthRemoveAccents: Removes diacritics from stringToBase64: Converts string to Base64FromBase64: Converts Base64 to string
DateTime Extensions
ToFormattedString: Formats date to "dd.MM.yyyy HH:mm:ss"IsBetween: Checks if date is between two datesStartOfDay: Gets start of dayEndOfDay: Gets end of dayStartOfWeek: Gets start of weekEndOfWeek: Gets end of weekStartOfMonth: Gets start of monthEndOfMonth: Gets end of month
Object Extensions
ToJson: Converts object to JSON stringFromJson<T>: Converts JSON string to objectClone<T>: Creates deep copy of objectIsNull: Checks if object is nullIsNotNull: Checks if object is not null
LINQ Extensions
WhereIf: Conditionally applies Where clauseOrderByIf: Conditionally applies OrderBy clauseSkipIf: Conditionally applies Skip clauseTakeIf: Conditionally applies Take clause
HTTP Context Extensions
GetClientIP: Gets client IP addressGetUserAgent: Gets user agent stringGetDeviceInfo: Gets device informationGetRequestPath: Gets request pathGetRequestMethod: Gets request method
Service Collection Extensions
AddServices: Adds services with lifetimeAddRepositories: Adds repositories with lifetimeAddValidators: Adds validators with lifetimeAddMappers: Adds mappers with lifetime
File Extensions
GetFileExtension: Gets file extensionGetFileName: Gets file nameGetFileSize: Gets file sizeIsImage: Checks if file is imageIsPdf: Checks if file is PDFIsExcel: Checks if file is Excel
JSON Extensions
MaskSensitiveData: Masks sensitive data in JSONUnmaskSensitiveData: Unmasks sensitive data in JSONToJson: Converts object to JSON stringFromJson<T>: Converts JSON string to object
Claims Extensions
GetUserId: Gets user ID from claimsGetUserName: Gets username from claimsGetUserEmail: Gets user email from claimsGetUserRoles: Gets user roles from claimsHasRole: Checks if user has roleHasClaim: Checks if user has claim
Features
- Null-safe operations
- Type conversion helpers
- Collection manipulation
- Date/time utilities
- HTTP context utilities
- File handling
- JSON processing
- Claims processing
| Product | Versions 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 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. 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.
-
net8.0
- Microsoft.AspNetCore.Http (>= 2.3.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.Routing.Abstractions (>= 2.3.0)
- Microsoft.AspNetCore.StaticFiles (>= 2.3.0)
- Swashbuckle.AspNetCore (>= 8.1.1)
- UAParser (>= 3.1.47)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|