PowerCSharp.Core 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PowerCSharp.Core --version 1.0.0
                    
NuGet\Install-Package PowerCSharp.Core -Version 1.0.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="PowerCSharp.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PowerCSharp.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="PowerCSharp.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 PowerCSharp.Core --version 1.0.0
                    
#r "nuget: PowerCSharp.Core, 1.0.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 PowerCSharp.Core@1.0.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=PowerCSharp.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=PowerCSharp.Core&version=1.0.0
                    
Install as a Cake Tool

PowerCSharp.Core

PowerCSharp Banner

PowerCSharp.Core License: MIT NuGet NuGet Downloads

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

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guidelines for details.

Development Setup

  1. Clone the repository
  2. Navigate to PowerCSharp.Core project
  3. Run tests to ensure everything works
  4. Make your changes
  5. Add tests for new functionality
  6. Submit a Pull Request

๐Ÿ“„ License

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

๐Ÿ“ž Support


PowerCSharp.Core - The foundation of powerful C# development! ๐Ÿš€

โ† Back to Main Documentation

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last Updated
2.0.3 251 7/23/2026
2.0.2 393 6/22/2026
1.0.0 287 6/8/2026
0.3.0 161 6/2/2026
0.2.0 172 6/1/2026
0.1.0 236 5/30/2026