9 packages tagged with “extension-method”
A deliberately-small collection of useful extension methods with an embarrassing lack of test coverage.
Pacote de métodos extensíveis para agilizar na validação e manipulação do desenvolvimento. - BoolExtension - ByteExtension - DateTimeExtension - DecimalExtension - DoubleExtension - EmailExtension - EnumExtension - FloatExtension - GuidExtension - IntExtension - JwtExtension - LinqExtension - LongExtension - NewtonsoftJsonExtension - StringExtension - SystemTextJsonExtension - TimeSpanExtension
A collection of utility classes and extension methods that are generally useful and not specifically related to any particular project.
Extension methods that provide a simple, thread-safe mechanism for firing events.
Generates string properties to access enum descriptions on marked types. Primarily used to simplify binding enum description text in UI elements and avoid runtime reflection. Also allows description access via extension method for targeted enums.
Mark an enum with [VisitorGenerator] and the source generator creates visitor interfaces and strongly-typed Accept extension methods that dispatch by enum member. It also supports [VisitorToMethod] on stateless struct visitors to generate ergonomic enum extension wrappers, including tuple argument flattening. This helps replace error-prone manual switches while keeping allocation-free struct visitor paths.
Useful IEnumerable extension methods.
This is a .NET Standard class library that provides an extension for transforming a ulong of bytes into a human-readable format. It is primarily designed for measuring disk sizes. For example, passing 867630342949 will return the string "808.4 GB". Compatible with .NET Standard 2.0, making it usable across .NET Framework, .NET Core, and .NET 5 and later versions. Key features include: Localization support via the optional Culture parameter. Customizable decimal places (0 to 15). Ability to force formatting to a specific unit (e.g., MB, GB, PB). Optional thousands separator for readability.
ToPagedListAsync is a lightweight async pagination extension for IQueryable with Entity Framework Core. It returns the total count, page size, current page, paged data, and flags indicating whether it is the first or last page. Ideal for clean and efficient pagination in APIs or web apps.