TaskTupleAwaiter

Enable using the new Value Tuple structure to write elegant code that allows async methods to be fired in parallel despite having different return types var (result1, result2) = await (GetStringAsync(), GetGuidAsync()); Based on the work of Joseph Musser https://github.com/jnm2


Keywords
C#, 7.0, Value, Tuple, Async, Await, Elegant, Code
License
MIT
Install
Install-Package TaskTupleAwaiter -Version 1.2.1

Documentation

TaskTupleAwaiter

Async helper library to allow leveraging the new ValueTuple data types in C# 7.0 to thread and run tasks with disparate return types.

var (result1, result2) = await (GetStringAsync(), GetGuidAsync());

var (policy, preferences) = await (
    GetPolicyAsync(policyId, cancellationToken),
    GetPreferencesAsync(cancellationToken)
).ConfigureAwait(false);

NuGet