A set of several .NET libraries which provide common building blocks that can be used by any kind of library or application.
NCommons is a growing set of several .NET libraries which aim to extend the existing .NET Framework BCL. In essence, NCommons could be described as a "utility library" which defines common classes that may be useful in any kind of project.
While such libraries are certainly nothing new, NCommons has the following goals and advantages:
- Important members only:
NCommons is supposed to be a set of "no-nonsense" libraries. In essence, this means that there will be no library which contains members that can be written manually in a very short amount of time. Anything that gets added to one of these library will at least have a medium level of complexity or required boilerplate - basically everything, that is reusable but tedious to write. - It feels like .NET:
A lot of time is spent on making NCommon's types feel like .NET. If you know .NET's BCL, you will feel at home when using one of these libraries. - Fully documented:
Nearly every public member exposed by the libraries is extensively documented with XML documentation comments. - C# 8.0/Nullable Reference Types Support:
The entire library has been built with support for Nullable Reference Types.
NCommons.Collections
provides several specialized, generic collection-type
members which fill some open gaps in the System.Collections.Generic
namespace.
Notable members include:
NCommons.Monads
provides several members which assist in writing type-safe
and expressive code. Even though the package is called "Monads", the included
members don't necessarily have to be monadic.
In general, the goal of the package is to provide utility types, monadic or not,
which assist in writing precise code that still looks and behaves like traditional C#.
While inspired by functional programming languages, the provided types still look
and feel like types that could come straight from the .NET Framework's BCL.
Notable members include:
NCommons.Observables
provides members which aim to reduce the amount of
required boilerplate code for implementing the MVVM pattern in UI-based
applications using frameworks like WPF or WinUI.
Notable members include:
Each library described above is available on NuGet. You can install it via:
Install-Package [Package-Name]
--or--
dotnet add package [Package-Name]
While no hand-written articles are available, a lot of time has been spent on writing XML documentation comments inside the source code. The goal is to provide a nearly flawless documentation which accurately describes each public member that is exposed by the libraries.
While the documentation can easily be viewed in your preferred IDE, you can also browse it online.
If you have any issues, feel free to open an issue.
- Do you feel that some crucial component is missing?
- Did you find a bug?
- Do you want to improve comments or code passages?
If any of this is true, feel free to open an issue or hit me with a pull request. If you are going to put a larger amount of time into a PR, be sure to talk about the change first! Otherwise, feel free to contribute or discuss!
Be sure to also read the following notes:
Whenever a commit to master
finishes, the project is automatically built and published to NuGet.
Changes to master
must be in a 100% deployable state (i.e. tested and complete).
Changes should be created on feature/
branches and collected on the dev
branch.
Once there are enough changes to justify a new NuGet version, dev
will be merged into master
and published.
See the LICENSE file for details.