change LoadEnvelope method

This commit is contained in:
2025-08-22 20:05:53 +02:00
parent 1577440b77
commit 30e2ac602d
4 changed files with 36 additions and 19 deletions

View File

@@ -36,4 +36,18 @@ public static class TaskExtensions
var result = await task;
return result?.Any() ?? false ? result : throw new NotFoundException(exceptionMessage);
}
/// <summary>
///
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="I"></typeparam>
/// <param name="task"></param>
/// <param name="act"></param>
/// <returns></returns>
public static async Task<I> Then<T, I>(this Task<T> task, Func<T, I> act)
{
var res = await task;
return act(res);
}
}