Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Polly-Contrib/Simmy/llms.txt

Use this file to discover all available pages before exploring further.

Simmy is distributed as the Polly.Contrib.Simmy NuGet package. It has a single runtime dependency on Polly and targets three .NET Standard versions, so it slots into virtually any modern .NET project without additional configuration.

Install the package

Choose the installation method that matches your workflow. All three options install the same package and produce the same result.
dotnet add package Polly.Contrib.Simmy
When using PackageReference, replace 0.3.0 with the specific version you want to pin. See the version history below for available releases and their highlights.

Requirements

Target frameworks

Simmy compiles against three .NET Standard targets. Any .NET runtime that implements one of these is supported, including .NET Framework 4.5+, .NET Core 1.x–3.x, and .NET 5 and later.
Target frameworkSupported
.NET Standard 1.1
.NET Standard 2.0
.NET Standard 2.1

Polly dependency

Simmy requires Polly v7.1.0 or later. The NuGet package declares this as a direct dependency, so the package manager will resolve a compatible Polly version automatically if one is not already present in your project.
Simmy is designed for the Polly v7 API surface. If you are evaluating Polly v8 (Resilience Pipelines), check the Simmy GitHub repository for the latest compatibility information before installing.

Import the namespace

After installing the package, add the following using directive to any file that configures or executes Simmy chaos policies:
using Polly.Contrib.Simmy;
This brings MonkeyPolicy — the central entry point for building all chaos policies — into scope. Depending on which policy types you use, you may also need:
using System;                  // TimeSpan (for latency policies)
using System.Net.Sockets;      // SocketException (for exception injection examples)
using System.Net.Http;         // HttpResponseMessage (for result injection examples)
using System.Threading;        // CancellationToken (for async and delegate-based options)
using Polly;                   // Policy, Context, PolicyWrap

Version history

The 0.3.0 release was the most significant update to the library and is the recommended version for new projects.Highlights:
  • Introduced the fluent-builder syntax for all policy configuration (with.Fault(...).InjectionRate(...).Enabled()).
  • Added intuitive syntax for result stubbing, useful in unit tests and for simulating how systems handle faults.
  • Added support for .NET Standard 2.1.
  • Validates constant InjectionRate values at policy configuration time, catching out-of-range values (< 0 or > 1) immediately rather than at execution time.
  • The library now compiles on macOS and Linux.

Build docs developers (and LLMs) love