VOOZH about

URL: https://www.nuget.org/packages/DKNet.Fw.Extensions/

⇱ NuGet Gallery | DKNet.Fw.Extensions 10.0.27




👁 Image
DKNet.Fw.Extensions 10.0.27

dotnet add package DKNet.Fw.Extensions --version 10.0.27
 
 
NuGet\Install-Package DKNet.Fw.Extensions -Version 10.0.27
 
 
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="DKNet.Fw.Extensions" Version="10.0.27" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.Fw.Extensions" Version="10.0.27" />
 
Directory.Packages.props
<PackageReference Include="DKNet.Fw.Extensions" />
 
Project file
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 DKNet.Fw.Extensions --version 10.0.27
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DKNet.Fw.Extensions, 10.0.27"
 
 
#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 DKNet.Fw.Extensions@10.0.27
 
 
#: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=DKNet.Fw.Extensions&version=10.0.27
 
Install as a Cake Addin
#tool nuget:?package=DKNet.Fw.Extensions&version=10.0.27
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DKNet.Fw.Extensions

👁 NuGet
👁 NuGet Downloads
👁 .NET

A comprehensive collection of framework-level extensions and utilities for .NET applications. This package provides essential extension methods for common types, encryption utilities, and type manipulation tools to enhance productivity and code readability.

Features

  • String Extensions: Number validation, digit extraction, and type checking utilities
  • DateTime Extensions: Quarter calculations, month operations, and date manipulations
  • Enum Extensions: Display attribute retrieval and enum information extraction
  • Type Extensions: Generic type checking, value type validation, and reflection utilities
  • Async Extensions: IAsyncEnumerable utilities for async data processing
  • Property Extensions: Reflection-based property manipulation and type checking
  • Attribute Extensions: Custom attribute retrieval and metadata operations
  • Encryption Utilities: Built-in encryption and hashing capabilities

Supported Frameworks

  • .NET 9.0+

Installation

Install via NuGet Package Manager:

dotnet add package DKNet.Fw.Extensions

Or via Package Manager Console:

Install-Package DKNet.Fw.Extensions

Quick Start

String Extensions

using DKNet.Fw.Extensions;

// Extract digits from mixed content
string text = "Price: $123.45";
string digits = text.ExtractDigits(); // "123.45"

// Check if string is a valid number
bool isValid = "123.45".IsNumber(); // true

DateTime Extensions

using DKNet.Fw.Extensions;

var date = DateTime.Now;

// Get last day of current month
DateTime lastDay = date.LastDayOfMonth();

// Get quarter information
int quarter = date.Quarter(); // 1, 2, 3, or 4

Enum Extensions

using DKNet.Fw.Extensions;
using System.ComponentModel.DataAnnotations;

public enum Status
{
 [Display(Name = "Active Status")]
 Active,
 
 [Display(Name = "Inactive Status")]
 Inactive
}

var status = Status.Active;
var displayAttr = status.GetAttribute<DisplayAttribute>();
string displayName = displayAttr?.Name ?? status.ToString();

Async Extensions

using System.Collections.Generic;

IAsyncEnumerable<int> asyncNumbers = GetAsyncNumbers();
IList<int> numbers = await asyncNumbers.ToListAsync();

Configuration

This package requires no specific configuration. Simply add the using statements for the namespaces you need:

using DKNet.Fw.Extensions; // Core extensions
using System.Collections.Generic; // Async extensions

API Reference

StringExtensions

  • ExtractDigits(string) - Extracts numeric characters from a string
  • IsNumber(string) - Validates if a string represents a valid number
  • IsStringOrValueType(PropertyInfo) - Checks if property can store string or value types

DateTimeExtensions

  • LastDayOfMonth(DateTime) - Returns the last day of the month
  • Quarter(DateTime) - Determines the quarter of the year (1-4)

EnumExtensions

  • GetAttribute<T>(Enum) - Retrieves custom attributes from enum values
  • GetEnumInfo(Enum) - Gets comprehensive enum information including display attributes

TypeExtensions

  • IsStringOrValueType(Type) - Determines if type is string or value type
  • Various generic type checking utilities

AsyncEnumerableExtensions

  • ToListAsync<T>(IAsyncEnumerable<T>) - Converts async enumerable to list

Advanced Usage

Type Checking with Reflection

using DKNet.Fw.Extensions;
using System.Reflection;

public class Example
{
 public string Name { get; set; }
 public int Age { get; set; }
 public DateTime? BirthDate { get; set; }
}

// Check if properties can store simple values
var properties = typeof(Example).GetProperties();
foreach (var prop in properties)
{
 bool canStoreSimpleValue = prop.IsStringOrValueType();
 Console.WriteLine($"{prop.Name}: {canStoreSimpleValue}");
}

Working with Display Attributes

using DKNet.Fw.Extensions;
using System.ComponentModel.DataAnnotations;

public enum Priority
{
 [Display(Name = "Low Priority", Description = "Non-urgent items")]
 Low,
 
 [Display(Name = "High Priority", Description = "Urgent items")]
 High
}

// Get detailed enum information
var priority = Priority.High;
var enumInfo = priority.GetEnumInfo();
// Access enumInfo.DisplayName, enumInfo.Description, etc.

Thread Safety

  • All extension methods are thread-safe as they are stateless
  • Encryption utilities maintain thread safety
  • No shared mutable state across method calls

Performance Considerations

  • String operations use modern .NET patterns and are optimized for performance
  • Reflection-based operations are cached where possible
  • Async operations follow .NET async best practices

Contributing

See the main for guidelines on how to contribute to this project.

License

This project is licensed under the .

Related Packages

  • - Entity Framework Core specific extensions
  • - Messaging extensions for SlimMessageBus

Part of the DKNet Framework - A comprehensive .NET framework for building modern, scalable applications.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on DKNet.Fw.Extensions:

Package Downloads
DKNet.EfCore.Extensions

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

DKNet.EfCore.Hooks

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

DKNet.AspCore.Idempotency

DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.27 236 5/22/2026
10.0.26 186 5/19/2026
10.0.25 466 3/27/2026
10.0.24 177 3/27/2026
10.0.23 177 3/27/2026
10.0.22 168 3/26/2026
10.0.21 224 3/17/2026
10.0.20 194 2/2/2026
10.0.19 321 1/21/2026
10.0.18 167 1/21/2026
10.0.17 188 1/19/2026
10.0.16 168 1/18/2026
10.0.15 172 1/18/2026
10.0.14 172 1/18/2026
10.0.13 175 1/17/2026
10.0.12 169 1/17/2026
10.0.11 172 1/17/2026
10.0.10 166 1/17/2026
10.0.9 175 1/16/2026
10.0.8 192 1/16/2026
Loading failed