Skip to content
Alex Kamsteeg edited this page Nov 5, 2019 · 8 revisions

Overview

SwissArmyKnife's code is fully documented and unit tested C# code, with a lot of benchmarks using BenchmarkDotNet. It's fully compatible with other .NET languages like VB.net and targets multiple .NET frameworks:

  • .NET 4.6.1
  • NETSTANDARD 2.0

Contents

Principles

The code is written with the following principles in mind:

  1. No build errors or warnings
  2. Unit test everything
  3. (XML) Documentation for everything
  4. Benchmark as much as possible
  5. The only external dependency is System/mscorlib

No build errors or warnings

SwissArmyKnife builds with no errors or warnings. To enforce this, the project setting 'Treat warnings as errors' is set to true for all build configurations. The only warning it might generate in consuming code is Obsolete, when some functionality might be deprecated in the future.

Unit test everything

Every public (public or protected) method or class is unit tested using xUnit.

(XML) Documentation for everything

Every method or class in SwissArmyKnife has complete XML documentation. The XMLdoc is exported on build and included in the NuGet package. This documentation shows up in the IntelliSense popups inside Visual Studio.

Usage documentation is available on this Wiki.

Benchmark as much as possible

Using BenchmarkDotNet much of the code is benchmarked. Inside the solution is a executable SwissArmyKnife.Benchmarks project to run the benchmarks.

The only external dependency is System/mscorlib

SwissArmyKnife keeps the external dependencies to a minimum. It only depends, like every other .NET project, on System/mscorlib.

Compile the code

Since SwissArmyKnife is written in C#6 you need at least Visual Studio 2017. The free Community edition is perfectly fine.

Clone this wiki locally