Home

Awesome

SheepTools

GitHub Actions Azure DevOps

Code coverage Sonar Quality Sonar vulnerabilities Sonar bugs Sonar code smells

SheepToolsNugetAPI
SheepTools.MoqNugetAPI
SheepTools.XUnitNugetAPI

SheepTools is a .NET toolbox library (yet another!) which contains handy classes, extension methods, etc.

It's divided in different libraries so that using the general purpose, main one doesn't imply adding any transitive dependencies to your project.

I'm more than happy to accept suggestions, comments, or addition proposals.

Relevant info

Content


<a name="sheeptools"></a>

SheepTools

Nuget

<a name="point"></a>

Point

2D Point class with an optional string Id.

<a name="intpoint"></a>

IntPoint

Slim 2D Point class, using ints and without an optional string Value

<a name="point3d"></a>

IntPointWithValue

Slim 2D Point class, using ints and with and optional string Id

<a name="point3d"></a>

Point3D

3D point class with an optional string Id.

<a name="line"></a>

Line

2D (straight) line class.

<a name="bitmatrix"></a>

BitMatrix

Class to work with bidimensional matrixes of bits.

<a name="bitarray-comparer"></a>

BitArrayComparer

IEqualityComparer<BitArray> implementation

<a name="tree-node"></a>

TreeNode

Tree node class with a generic key.

<a name="node"></a>

Node

Tree node class with a string key.

Essentially, TreeNode<string>.

<a name="maths"></a>

Maths

General math algorithms

<a name="ensure"></a>

Ensure

Assert-style class that throws exceptions when things don't go as expected.

<a name="rangehelpers"></a>

RangeHelpers

Helper class to generate ranges of numbers before having to check if it was (a, b), [a, b] or (a, b] in Microsoft documentation every time I use Enumberable.Range.

<a name="lerp"></a>

LinearInterpolation

Helper methods to interpolate 2D points

<a name="assembly-extensions"></a>

AssemblyExtensions

<a name="bitarray-extensions"></a>

BitArrayExtensions

<a name="char-extensions"></a>

CharExtensions

<a name="string-extensions"></a>

<a name="collection-extensions"></a>

CollectionExtensions

<a name="datetime-extensions"></a>

DateTimeExtensions

<a name="dictionary-extensions"></a>

DictionaryExtensions

<a name="direction-extensions"></a>

DirectionExtensions

<a name="double-extensions"></a>

DoubleExtensions

<a name="enumerable-extensions"></a>

EnumerableExtensions

<a name="int-extensions"></a>

IntExtensions

<a name="numeric-extensions"></a>

NumericExtensions

<a name="stopwatch-extensions"></a>

StopwatchExtensions

<a name="string-extensions"></a>

StringExtensions

<a name="vector2-extensions"></a>

Vector2Extensions

<a name="sheeptools-moq"></a>

SheepTools.Moq

Nuget

Depends on Moq and Microsoft.Extensions.Logging.

<a name="moq-logger-extensions"></a>

MoqLoggerExtensions

Helps verifying ILogger invocations.

<a name="moq-genericlogger-extensions"></a>

MoqGenericLoggerExtensions

Helps verifying ILogger<T> invocations.

<a name="sheeptools-xunit"></a>

SheepTools.XUnit

Nuget

<a name="asssert"></a>

Depends on XUnit.

Asssert