Selkie.DefCon.One.Common
0.2.38
dotnet add package Selkie.DefCon.One.Common --version 0.2.38
NuGet\Install-Package Selkie.DefCon.One.Common -Version 0.2.38
<PackageReference Include="Selkie.DefCon.One.Common" Version="0.2.38" />
<PackageVersion Include="Selkie.DefCon.One.Common" Version="0.2.38" />
<PackageReference Include="Selkie.DefCon.One.Common" />
paket add Selkie.DefCon.One.Common --version 0.2.38
#r "nuget: Selkie.DefCon.One.Common, 0.2.38"
#:package Selkie.DefCon.One.Common@0.2.38
#addin nuget:?package=Selkie.DefCon.One.Common&version=0.2.38
#tool nuget:?package=Selkie.DefCon.One.Common&version=0.2.38
Selkie.DefCon
A .NET library providing defensive programming utilities and testing helpers for building robust applications.
Features
- Guard Clauses: Comprehensive set of guard methods to validate method arguments
- Constructor Testing: Automated testing utilities for constructor null checks using AutoFixture and NSubstitute
- MSTest Integration: Seamless integration with MSTest2 for automated testing
- Autofac Support: Built-in Autofac module for dependency injection
Installation
Install via NuGet Package Manager:
dotnet add package Selkie.DefCon.One
Or via Package Manager Console:
Install-Package Selkie.DefCon.One
Quick Start
Using Guard Clauses
using Selkie.DefCon.One.Common;
public class MyService
{
private readonly string _name;
public MyService(string name)
{
Guard.ArgumentNotNullOrEmpty(name, nameof(name));
_name = name;
}
public void ProcessValue(int value)
{
Guard.ArgumentNotNegative(value, nameof(value));
// Process value...
}
}
Constructor Testing
using Selkie.DefCon.One.Constructor;
[TestClass]
public class MyServiceTests
{
[TestMethod]
public void Constructor_Should_ThrowForNullParameters()
{
var sut = new NotNullTester<MyService>();
sut.RunAllNotNullChecks();
}
}
Requirements
- .NET 8.0 or higher
Building from Source
Clone the repository:
git clone https://github.com/tschroedter/Selkie.DefCon.git cd Selkie.DefConRestore dependencies:
cd src dotnet restoreBuild the solution:
dotnet buildRun tests:
dotnet test
Version Management
This project uses centralized version management. To update the version before building:
# On Linux/macOS
./update-version.sh 1.2.3
# On Windows
.\update-version.ps1 -Version "1.2.3"
For more information, see VERSION_MANAGEMENT.md.
Contributing
Contributions are welcome! Please read our Contributing Guidelines for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with AutoFixture
- Uses NSubstitute for test substitutes
- Dependency injection powered by Autofac
Support
If you encounter any issues or have questions, please open an issue on GitHub.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Selkie.DefCon.One.Common:
| Package | Downloads |
|---|---|
|
Idasen.Desk.Core
This package is about controlling Ikea's Idasen Desk using Windows 10 and BluetoothLE. Ikea only provides an Android and IOs app to control the desk. I thought it would be far more convenient to control the desk using a Windows 10 system tray application. This repository contains all the low level code to detect and control the desk. |
|
|
Selkie.DefCon.One
A .NET library providing defensive programming utilities (Guard clauses) and automated testing helpers for constructor null checks. Integrates with MSTest, AutoFixture, and NSubstitute for robust test automation. |
|
|
Idasen.Desk.Core.Win11
This package is about controlling Ikea's Idasen Desk using Windows 10 and BluetoothLE. Ikea only provides an Android and IOs app to control the desk. I thought it would be far more convenient to control the desk using a Windows 10 system tray application. This repository contains all the low level code to detect and control the desk. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.38 | 478 | 4/29/2026 |
| 0.2.0 | 409 | 11/6/2025 |
| 0.1.37 | 115 | 4/29/2026 |
| 0.1.36 | 121 | 4/29/2026 |
| 0.1.35 | 116 | 4/29/2026 |
| 0.1.34 | 115 | 4/29/2026 |
| 0.1.29 | 509 | 12/10/2025 |
| 0.1.28 | 496 | 12/10/2025 |
| 0.1.27 | 485 | 12/10/2025 |
| 0.1.5 | 291 | 10/22/2025 |
| 0.1.0 | 248 | 10/21/2025 |
| 0.0.23 | 1,835 | 5/30/2025 |
| 0.0.22 | 307 | 1/20/2025 |
| 0.0.17 | 3,194 | 9/30/2020 |
| 0.0.15 | 817 | 9/23/2020 |