eQuantic.Core
1.8.0
dotnet add package eQuantic.Core --version 1.8.0
NuGet\Install-Package eQuantic.Core -Version 1.8.0
<PackageReference Include="eQuantic.Core" Version="1.8.0" />
<PackageVersion Include="eQuantic.Core" Version="1.8.0" />
<PackageReference Include="eQuantic.Core" />
paket add eQuantic.Core --version 1.8.0
#r "nuget: eQuantic.Core, 1.8.0"
#:package eQuantic.Core@1.8.0
#addin nuget:?package=eQuantic.Core&version=1.8.0
#tool nuget:?package=eQuantic.Core&version=1.8.0
eQuantic Core Library
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.
๐ Related Packages
eQuantic Core is part of the eQuantic ecosystem. Check out these related packages:
- eQuantic.Core.Data - Data access patterns and repositories
- eQuantic.Core.Data.EntityFramework - Entity Framework implementation
๐ Support
For support, please visit our GitHub Issues page.
eQuantic Systems - Building the future, one component at a time.
Product | Versions 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. |
-
.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, ...