Skip to content

Latest commit

Β 

History

1,368 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

C# Framework Extensions

License Language CI Last Commit Activity

Stars Forks Issues Code Size Repo Size

NuGet

The .NET base class libraries leave gaps β€” methods that obviously belong on a type and are not there, and whole types you end up rewriting in every project. These packages fill both, and Backports lets the same code use modern C# on runtimes that never had it.

🧭 Vision

The .NET base class libraries are missing things in two different ways: methods that obviously belong on a type and are not there, and whole types you end up writing again in every project. These packages fill both, and the Backports package adds a third β€” letting code written against modern C# compile and run on runtimes that predate it.

The aim is that reaching for an extension should feel like reaching for the BCL: the method is where you would have looked for it, named what you would have called it, and available on the oldest target you still have to support.

✨ Features

  • Extension methods on the BCL types, placed where you would look for them
  • The types the BCL lacks, rather than a copy of them per project
  • Backports β€” modern C# language and library features on runtimes that never had them
  • Split per assembly surface (Corlib, WinForms, WPF, System.Drawing, ASP.NET, Win32, DirectoryServices, Office) so a project takes only what it uses
  • Multi-targeted from .NET Framework through current .NET

πŸ“¦ Installation

dotnet add package FrameworkExtensions.Corlib

Every package is listed in the package table below; take only the ones matching the assemblies your project already references.

πŸš€ Quick start

using System;

// Methods that should have been on the type in the first place.
"a,b,,c".Split(',').Where(i => !string.IsNullOrEmpty(i)).ForEach(Console.WriteLine);

The complete surface of each package is generated into its own REFERENCE.md, linked from the package's README on nuget.org.

πŸ“š Packages

Package Description Version Downloads
FrameworkExtensions.Backports Extensions to assure newer compiler features work in older versions. NuGet Version NuGet Downloads
FrameworkExtensions.Corlib Extensions for every type of project. NuGet Version NuGet Downloads
FrameworkExtensions.ASP.NET Extensions to ASP.NET. NuGet Version NuGet Downloads
FrameworkExtensions.DirectoryServices Extensions to DirectoryServices. NuGet Version NuGet Downloads
FrameworkExtensions.Microsoft.Office Extensions to Microsoft Office. NuGet Version NuGet Downloads
FrameworkExtensions.Microsoft.Win32 Extensions to Microsoft.Win32. NuGet Version NuGet Downloads
FrameworkExtensions.PresentationCore Extensions to WPF. NuGet Version NuGet Downloads
FrameworkExtensions.System.Drawing Extensions to System.Drawing. NuGet Version NuGet Downloads
FrameworkExtensions.System.Windows.Forms Extensions to WindowsForms. NuGet Version NuGet Downloads

πŸ› οΈ Building

# Restore + build a single package (cross-platform packages build anywhere):
dotnet build Corlib.Extensions/Corlib.Extensions.csproj --configuration Release

# Run the unit tests (Windows; multi-target frameworks):
dotnet test Tests/Corlib.Tests/Corlib.Tests.csproj --configuration Release

CI builds the cross-platform packages on Linux and runs the test suite on Windows across the supported target frameworks β€” see CI/CD.

🀝 Contributing

  • give credit to Hawkynt when using
  • please open pull requests if you add something
  • report issues and get in contact via GitHub

See CONTRIBUTING for the contribution rules.

❀️ Support

If this project saves you time or money, consider supporting its development:

GitHub Sponsors PayPal

πŸ“œ License

Licensed under LGPL-3.0-or-later β€” see LICENSE.

About

Extensions to the .NET Framework for use with C# programming language.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages