BryanWilhite / SonghayCore

core reusable, opinionated concerns for *all* 🧐 of my C# projects
http://songhayblog.azurewebsites.net/
MIT License
1 stars 0 forks source link

consider extending `IActivity` with `IActivityWithThroughput<IDisposable>` #126

Open BryanWilhite opened 3 years ago

BryanWilhite commented 3 years ago

the IActivity space in the Core recognizes input and output but not throughput (which I argue is characteristic of types implementing IDisposable); the following intends to address throughput:

public interface IActivityWithThroughput<IDisposable> : IActivity
{
    void Start(Action<IDisposable> throughputAction)
}

public interface IActivityWithTaskThroughput<IDisposable> : IActivity
{
    Task StartAsync(Action<IDisposable> throughputAction)
}

📖 http://songhayblog.azurewebsites.net/entry/2021-06-26-studio-status-report-2021-06/