PowerCSharp.Core
2.0.3
dotnet add package PowerCSharp.Core --version 2.0.3
NuGet\Install-Package PowerCSharp.Core -Version 2.0.3
<PackageReference Include="PowerCSharp.Core" Version="2.0.3" />
<PackageVersion Include="PowerCSharp.Core" Version="2.0.3" />
<PackageReference Include="PowerCSharp.Core" />
paket add PowerCSharp.Core --version 2.0.3
#r "nuget: PowerCSharp.Core, 2.0.3"
#:package PowerCSharp.Core@2.0.3
#addin nuget:?package=PowerCSharp.Core&version=2.0.3
#tool nuget:?package=PowerCSharp.Core&version=2.0.3
PowerCSharp.Core

The foundational core of the PowerCSharp ecosystem, providing centralized interfaces, models, and base functionality for all PowerCSharp packages. This package has been refactored to provide a clean, dependency-free foundation with improved architectural separation.
๐ฆ Package Information
- Package ID:
PowerCSharp.Core - Version: 0.3.0
- Target Frameworks: .NET 8.0, .NET Standard 2.0
- Dependencies: None (dependency-free)
๐๏ธ Architecture Overview
PowerCSharp.Core serves as the architectural foundation for the entire PowerCSharp ecosystem:
Centralized Interfaces
All interfaces are centralized in PowerCSharp.Core to maintain proper architectural separation:
- PowerCSharp.Core.Interfaces.Extensions.Configuration - Configuration-related interfaces
- PowerCSharp.Core.Interfaces.Extensions.Linq - LINQ and dynamic query interfaces
- PowerCSharp.Core.Interfaces.Models - Model classes (reserved for future use)
Benefits
- Single source of truth for contracts and abstractions
- Consistent namespace organization across packages
- Easy dependency management across the ecosystem
- Clear architectural boundaries between packages
๐ Installation
dotnet add package PowerCSharp.Core
๐ Available Interfaces
Configuration Interfaces
IAppOptions
Namespace: PowerCSharp.Core.Interfaces.Extensions.Configuration
Represents the interface for application options.
public interface IAppOptions
{
string ConfigSectionPath { get; }
}
Usage Example:
using PowerCSharp.Core.Interfaces.Extensions.Configuration;
public class MyAppOptions : IAppOptions
{
public string ConfigSectionPath => "MyApp";
public string ApiKey { get; set; }
public int Timeout { get; set; }
}
LINQ & Dynamic Query Interfaces
IDynamicFilterProvider<T>
Namespace: PowerCSharp.Core.Interfaces.Extensions.Linq
Implement a Service Provider for dynamically filtering of the type T using Dynamic Expressions.
public interface IDynamicFilterProvider<T>
{
void SetFilter(Func<T, bool> filter);
Func<T, bool> GetFilter();
}
IDynamicOrderProvider<T>
Namespace: PowerCSharp.Core.Interfaces.Extensions.Linq
Implement a Service Provider for dynamically ordering of the type T using Dynamic Expressions.
public interface IDynamicOrderProvider<T>
{
void SetOrderDelegates(List<(Func<T, object>, bool)> delegates);
List<(Func<T, object>, bool)> GetOrderDelegates();
}
Usage Example:
using PowerCSharp.Core.Interfaces.Extensions.Linq;
// Create a dynamic filter provider
var filterProvider = new DynamicFilterProvider<Person>();
filterProvider.SetFilter(person => person.Age > 18 && person.Name.Contains("John"));
// Create a dynamic order provider
var orderProvider = new DynamicOrderProvider<Person>();
orderProvider.SetOrderDelegates(new List<(Func<Person, object>, bool)>
{
(person => person.Name, false), // Ascending by Name
(person => person.Age, true) // Descending by Age
});
๐ Package Dependencies
PowerCSharp.Core has no external dependencies, making it lightweight and ideal for inclusion in any project.
Other PowerCSharp packages reference PowerCSharp.Core for:
- Shared interfaces and contracts
- Common base types
- Architectural consistency
๐ฏ Use Cases
When to Use PowerCSharp.Core
- Building custom PowerCSharp extensions that need to implement standard interfaces
- Creating applications that use multiple PowerCSharp packages
- Developing libraries that need to integrate with PowerCSharp ecosystem
- Ensuring type safety across PowerCSharp packages
Integration Examples
With PowerCSharp.Extensions
using PowerCSharp.Extensions;
using PowerCSharp.Core.Interfaces.Extensions.Linq;
// Your custom filter implementation
public class PersonFilterProvider : IDynamicFilterProvider<Person>
{
private Func<Person, bool> _filter;
public void SetFilter(Func<Person, bool> filter) => _filter = filter;
public Func<Person, bool> GetFilter() => _filter ?? (p => true);
}
// Use with PowerCSharp.Extensions
var people = new List<Person>();
var filtered = people.Filter(new PersonFilterProvider());
With Configuration
using Microsoft.Extensions.Configuration;
using PowerCSharp.Extensions;
using PowerCSharp.Core.Interfaces.Extensions.Configuration;
public class DatabaseOptions : IAppOptions
{
public string ConfigSectionPath => "Database";
public string ConnectionString { get; set; }
public int Timeout { get; set; }
}
// Usage in application
var config = new ConfigurationBuilder().Build();
var dbOptions = config.GetOptions<DatabaseOptions>("Database");
๐งช Testing
PowerCSharp.Core includes comprehensive unit tests. Run tests with:
dotnet test src/PowerCSharp.Core.Tests
๐ Documentation
- Main PowerCSharp Documentation - Complete ecosystem overview
- PowerCSharp.Extensions API Documentation - Detailed API reference
- Contributing Guide - How to contribute
- Workflow Documentation - Development workflow
๐ค Contributing
Contributions are welcome! Please read our Contributing Guidelines for details.
Development Setup
- Clone the repository
- Navigate to PowerCSharp.Core project
- Run tests to ensure everything works
- Make your changes
- Add tests for new functionality
- Submit a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Related Packages
- PowerCSharp.Extensions - Comprehensive extension methods
- PowerCSharp.Utilities - Utility classes and helpers
- PowerCSharp.Helpers - Specialized helper classes
๐ Support
- ๐ Report Issues
- ๐ก Feature Requests
- ๐ง Email Support
PowerCSharp.Core - The foundation of powerful C# development! ๐
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. 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.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on PowerCSharp.Core:
| Package | Downloads |
|---|---|
|
PowerCSharp.Extensions
Extension methods for common .NET types to enhance productivity |
|
|
PowerCSharp.Helpers
Helper classes and methods for specialized programming tasks |
|
|
PowerCSharp.Utilities
Utility classes and helper methods for common programming tasks |
|
|
PowerCSharp.Extensions.AspNetCore
ASP.NET Core specific extension methods for PowerCSharp library |
|
|
PowerCSharp.Feature.Cache.Disk
Disk-backed LRU cache implementation for the PowerCSharp Cache feature. Targets net8.0. De-branded port of proven production code with atomic writes, file-lock coordination, and background cleanup. |
GitHub repositories
This package is not used by any popular GitHub repositories.