Skip to content

craigktreasure/Treasure.Utils

Repository files navigation

Treasure.Utils

CI Build codecov

This repository contains some of my common utilities.

Treasure.Utils.Argument

Important

This package is now deprecated as it isn't necessary in .NET 8+.

NuGet NuGet

Utilities for working with arguments with nullable awareness.

using Treasure.Utils;

public void SomeMethod(object? anObject, string? aString, object inheritedButUnused)
{
    Argument.MarkUsed(inheritedButUnused);
    Argument.NotNull(anObject);
    Argument.NotNullOrEmpty(aString);
    Argument.NotNullOrWhiteSpace(aString);
}