shutterstock_263965367.jpg
shutterstock_263965367.jpg

Outcome.NET


Never write a result wrapper again! Outcome.NET is a simple, powerful helper for methods that return a value, but sometimes also need to return validation messages, warnings, or a success bit.

SCROLL DOWN

Outcome.NET


Never write a result wrapper again! Outcome.NET is a simple, powerful helper for methods that return a value, but sometimes also need to return validation messages, warnings, or a success bit.

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.

LET'S BUILD SOMETHING.


Execution. Simplicity. Results.

We build amazing web-based products.

hello@getkinetiq.com

LET'S BUILD SOMETHING.


Execution. Simplicity. Results.

We build amazing web-based products.

hello@getkinetiq.com

Brian MacKay, founder of Kinetiq, is a hard-core web developer and entrepreneur with over 13 years of product development, line-of-business, and startup experience. 

With a strong emphasis on disciplined execution and hands-on technical leadership, Brian specializes in bringing new products to life on the web.

Currently working in Microsoft's web stack including C#, JavaScript, jQuery, KendoUI, SQL Server, and Azure cloud infrastructure. Deep knowledge of many cloud-based telephony platforms (Twilio, Tropo, and VoiceXml).

Brian is a published author, father, musician, designer, expert-level chess player (2006 Tampa chess champion), and a pretty good kickboxer as well, with training across 12 martial arts.