diff --git a/EnvelopeGenerator.Application/Common/Extensions/TaskExtensions.cs b/EnvelopeGenerator.Application/Common/Extensions/TaskExtensions.cs index 2fae57ea..163db9ce 100644 --- a/EnvelopeGenerator.Application/Common/Extensions/TaskExtensions.cs +++ b/EnvelopeGenerator.Application/Common/Extensions/TaskExtensions.cs @@ -74,22 +74,19 @@ public static class TaskExtensions /// /// /// - [Obsolete("Implement Mediator behaviors in the Osolete .NET project.")] - public static Task FirstAsync(this Task> task, Func factory) + public static Task FirstAsync(this Task> task, Func factory) where TException : Exception - => task.Then(t => t.FirstOrDefault()) ?? throw factory(); + => task.Then(t => t.FirstOrDefault() ?? throw factory()); } /// /// /// -[Obsolete("Implement Mediator behaviors in the Osolete .NET project.")] public static class Exceptions { /// /// /// - [Obsolete("Implement Mediator behaviors in the Osolete .NET project.")] public static NotFoundException NotFound() => new(); ///