interoptopus_csharp 0.16.0-alpha.13

The C# backend for Interoptopus.
Documentation
// Auto-generated plugin interop
// <auto-generated/>

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
using My.Company.Common;
using Interoptopus.API;

namespace My.Company;

partial class Plugin : IPlugin
{
    public static NestedA CreateA(uint value) => new NestedA(value);

    public static Task<NestedA> CreateAAsync(uint value) => Task.FromResult(new NestedA(value));

    public static uint GetValue() => 42;

    public static Task<uint> GetValueAsync() => Task.FromResult(42u);
}

partial class NestedA : INestedA<NestedA>
{
    private readonly uint _value;

    public NestedA() { _value = 0; }
    internal NestedA(uint value) { _value = value; }

    public static NestedA Create(uint value) => new NestedA(value);

    public static Task<NestedA> CreateAsync(uint value) => Task.FromResult(new NestedA(value));

    public uint GetValue() => _value;

    public Task<uint> GetValueAsync() => Task.FromResult(_value);
}