eQuantic.Core 1.8.0

dotnet add package eQuantic.Core --version 1.8.0
                    
NuGet\Install-Package eQuantic.Core -Version 1.8.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="eQuantic.Core" Version="1.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="eQuantic.Core" Version="1.8.0" />
                    
Directory.Packages.props
<PackageReference Include="eQuantic.Core" />
                    
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 eQuantic.Core --version 1.8.0
                    
#r "nuget: eQuantic.Core, 1.8.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 eQuantic.Core@1.8.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=eQuantic.Core&version=1.8.0
                    
Install as a Cake Addin
#tool nuget:?package=eQuantic.Core&version=1.8.0
                    
Install as a Cake Tool

eQuantic Core Library

NuGet NuGet Downloads License .NET

eQuantic Core is a comprehensive .NET library that provides a rich set of utilities, extensions, and design pattern implementations to enhance your applications. This library serves as the foundation for the entire eQuantic ecosystem, offering essential functionality that supports various other eQuantic packages.

๐Ÿš€ Features

๐Ÿ“ฆ Collections

  • PagedList<T>: Generic paged collection implementation
  • IPagedEnumerable: Interface for paged enumerations with metadata (PageIndex, PageSize, TotalCount)

๐Ÿงฉ Extensions

Comprehensive extension methods for common .NET types:

  • StringExtensions: Advanced string manipulation (LeftOf, RightOf, RemoveDiacritics, Slugify, etc.)
  • TaskExtensions: Async/await utilities and task management
  • TypeExtensions: Reflection helpers and type utilities
  • EnumerableExtensions: LINQ extensions and collection utilities
  • DateTimeExtensions: Date and time manipulation helpers
  • ExceptionExtensions: Exception handling utilities
  • GuidExtensions: GUID manipulation helpers
  • ListExtensions: List-specific extension methods
  • EnumExtensions: Enumeration utilities and helpers

๐Ÿ“… Date & Time Utilities

Advanced date and time manipulation tools:

  • TimeTool: Comprehensive time calculations and manipulations
  • TimeFormatter: Flexible time formatting utilities
  • DateDiff: Date difference calculations
  • SystemClock: Clock abstraction for testability
  • Time: Advanced time operations
  • TimeCompare: Time comparison utilities

๐Ÿ”’ Security

  • IEncrypting: Encryption interface with encoding capabilities
  • Encryptor: Default encryption implementation

๐Ÿ—๏ธ Design Patterns

  • IContainer: IoC container interface for dependency injection
  • ICaching: Caching interface with generic support

๐Ÿ› ๏ธ Utilities

  • ShortGuid: Base64-encoded GUID implementation for shorter string representations
  • RegNumberValidation: Registration number validation utilities
  • MethodExtractorVisitor: Expression tree method extraction

๐Ÿท๏ธ Attributes & Constants

  • LocalizedDescriptionAttribute: Localized description attribute for enums
  • StringConstants: Common string constants

๐Ÿ“ก Media Formatters

  • DateTimeConverterISO8601: ISO 8601 DateTime converter
  • HttpFile: HTTP file handling utilities

๐Ÿ“ฅ Installation

Install eQuantic.Core via NuGet Package Manager:

dotnet add package eQuantic.Core

Or via Package Manager Console:

Install-Package eQuantic.Core

๐ŸŽฏ Usage Examples

Collections - Paged Results

using eQuantic.Core.Collections;

// Create a paged list
var items = new List<string> { "item1", "item2", "item3" };
var pagedList = new PagedList<string>(items, totalCount: 100)
{
    PageIndex = 1,
    PageSize = 10
};

Console.WriteLine($"Page {pagedList.PageIndex} of {Math.Ceiling((double)pagedList.TotalCount / pagedList.PageSize)}");

String Extensions

using eQuantic.Core.Extensions;

string text = "Hello World";
string left = text.LeftOf(' '); // "Hello"
string right = text.RightOf(' '); // "World"

string withAccents = "Olรก, mรฃo!";
string slugified = withAccents.Slugify(); // "ola-mao"

string dirty = "Remove<script>alert('xss')</script>text";
string clean = dirty.UnHtml(); // "Removetext"

ShortGuid Usage

using eQuantic.Core;

// Generate a new short GUID (22 characters instead of 36)
ShortGuid shortId = ShortGuid.NewGuid();
Console.WriteLine(shortId.ToString()); // e.g., "FEx1sZbaCUifqz7VAp3j_g"

// Convert from regular GUID
Guid regularGuid = Guid.NewGuid();
ShortGuid fromGuid = new ShortGuid(regularGuid);

// Convert back to GUID
Guid converted = fromGuid.ToGuid();

Date & Time Utilities

using eQuantic.Core.Date;

// Advanced date operations
DateTime date = DateTime.Now;
DateTime startOfWeek = TimeTool.GetStartOfWeek(date, DayOfWeek.Monday);
DateTime dateOnly = TimeTool.GetDate(date);
DateTime withNewTime = TimeTool.SetTimeOfDay(date, 14, 30, 0); // 2:30 PM

// Date difference calculations
DateDiff diff = new DateDiff(DateTime.Now.AddDays(-30), DateTime.Now);
Console.WriteLine($"Difference: {diff.Days} days");

Type Extensions & Reflection

using eQuantic.Core.Extensions;

Type stringType = typeof(string);
bool isNullable = stringType.IsNullable(); // false

Type nullableInt = typeof(int?);
bool isNullableInt = nullableInt.IsNullable(); // true

// Get all types implementing an interface
var implementingTypes = typeof(IDisposable).GetImplementingTypes();

Caching Interface

using eQuantic.Core.Cache;

public class MyService
{
    private readonly ICaching _cache;

    public MyService(ICaching cache)
    {
        _cache = cache;
    }

    public async Task<string> GetDataAsync(string key)
    {
        if (!_cache.IsNull(key))
        {
            return _cache.Get<string>(key);
        }

        var data = await FetchDataFromSourceAsync(key);
        _cache.Add(data, key, timeout: 60); // Cache for 60 minutes
        return data;
    }
}

๐ŸŽฏ Target Frameworks

  • .NET Standard 2.1
  • .NET 6.0
  • .NET 7.0
  • .NET 8.0

๐Ÿค Contributing

We welcome contributions! Please feel free to submit pull requests or open issues to discuss potential improvements.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

eQuantic Core is part of the eQuantic ecosystem. Check out these related packages:

๐Ÿ“ž Support

For support, please visit our GitHub Issues page.


eQuantic Systems - Building the future, one component at a time.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on eQuantic.Core:

Package Downloads
eQuantic.Core.Data

eQuantic Core Data Class Library

eQuantic.Core.Data.EntityFramework

Core Data library for Entity Framework

eQuantic.Core.Domain

eQuantic Domain Library

eQuantic.Core.Api.Crud.Client

eQuantic Api CRUD Client Library

eQuantic.Core.Data.EntityFramework.SqlServer

Core Data library for Entity Framework and SQL Server

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.0 1,147 6/16/2025
1.7.1 140 6/15/2025
1.7.0 14,026 10/21/2023
1.6.0 7,435 8/27/2022
1.5.0.4 2,177 11/26/2020
1.5.0.3 629 11/8/2020
1.5.0.2 634 11/8/2020
1.5.0.1 1,894 6/7/2020
1.5.0 1,313 6/6/2020
1.4.10.4 840 9/19/2019
1.4.10.2 1,023 2/23/2019
1.4.10 6,712 1/10/2018
1.4.9.1 825 12/12/2018
1.4.9 4,603 10/2/2017
1.4.8 1,195 8/1/2017
1.4.7.1 1,985 7/19/2017
1.4.7 4,246 5/17/2017
1.4.6.3 2,268 4/20/2017
1.4.6.2 1,164 4/20/2017
1.4.6.1 1,141 4/19/2017
1.4.6 1,117 4/19/2017
1.4.5 4,233 1/31/2017
1.4.4 2,317 1/31/2017
1.4.3 2,359 1/8/2017
1.4.2 1,950 1/8/2017
1.4.1 1,264 1/4/2017
1.4.0 1,191 1/4/2017
1.3.1 1,309 1/2/2017
1.3.0 1,174 1/2/2017
1.2.2 2,108 10/7/2016
1.2.1.1 5,063 4/26/2016
1.2.1 3,317 4/26/2016
1.2.0 3,094 4/26/2016

Customed solutions for log, security, dependency injections, ...