ApprovalUtilities Features

May 11, 2024 ยท View on GitHub

Guards

Guards are convenient functions if incorrect values are passed in.

Guard.AgainstNullAndEmpty(subdirectory, nameof(subdirectory));

snippet source | anchor

Disposables.Create

using statements nicely cleanup on exit if you have a IDisposable or you can create a simple disposable object by passing in a lambda.

using (Disposables.Create(() => callCount++))
{
    //code
}

snippet source | anchor


Back to User Guide

Contents

  1. 1Guards
  2. 2Disposables.Create