What is Outcome.NET?

Outcome is the ultimate result wrapper! It's great for those awkward moments when you need to return a value, but you might also need to return a list of validation messages, warnings, or a success bit.

Here's a simple example:

  private IOutcome ValidateNumber(string number)
  {
      if (!number.IsNumeric())
      {
          return Outcomes.Failure()
                         .WithMessage("Invalid number (not numeric): " + number);
      }

      return Outcomes.Success();
  } 

Outcome really shines when you're orchestrating complex logic, because the fluent interface makes it easy to roll up messages from multiple methods, and even from unusual sources like exceptions.

How can I get started?

Check out the Getting Started Guide.

Where can I get it?

First, install NuGet. Then, install Outcome.NET from the package manager console:

PM> Install-Package Ether.Outcomes

Outcome.NET is Copyright © 2015 Brian MacKay, Kinetiq, and other contributors under the MIT license.