feat: initial project commit
All checks were successful
default / default (8.0) (push) Successful in 1m7s
All checks were successful
default / default (8.0) (push) Successful in 1m7s
This commit is contained in:
commit
30ef7bd477
40 changed files with 3752 additions and 0 deletions
16
src/Result/Errors/AggregateError.cs
Normal file
16
src/Result/Errors/AggregateError.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
namespace Geekeey.Extensions.Result;
|
||||
|
||||
/// <summary>
|
||||
/// An error which is a combination of other errors.
|
||||
/// </summary>
|
||||
/// <param name="errors">The errors the error consists of.</param>
|
||||
public sealed class AggregateError(IEnumerable<Error> errors) : Error
|
||||
{
|
||||
/// <summary>
|
||||
/// The errors the error consists of.
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<Error> Errors { get; } = errors.ToList();
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Message => string.Join(Environment.NewLine, Errors.Select(error => error.Message));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue