All checks were successful
default / dotnet default workflow (8.0) (push) Successful in 39s
19 lines
No EOL
603 B
C#
19 lines
No EOL
603 B
C#
// Copyright (c) The Geekeey Authors
|
|
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
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));
|
|
} |