interoptopus_csharp 0.16.0-alpha.15

The C# backend for Interoptopus.
Documentation
using System;
using System.Linq;
using System.Threading.Tasks;
using My.Company;
using My.Company.Common;
using Xunit;
using Array = My.Company.Array;


public class TestPatternServicesAsyncResult
{
    [Fact]
    public async void Success()
    {
        using var s = ServiceAsyncResult.Create();
        await s.Success();
    }

    [Fact]
    public async void Fail()
    {
        var exceptionThrown = false;
        using var s = ServiceAsyncResult.Create();

        try { await s.Fail(); }
        catch (EnumException<Error> e)
        {
            Assert.True(e.Value.IsFail);
            exceptionThrown = true;
        }

        Assert.True(exceptionThrown);
    }
}