feat: create request projects for basic CQRS

This commit is contained in:
Louis Seubert 2026-05-08 20:26:26 +02:00
commit d614788e06
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
190 changed files with 12236 additions and 0 deletions

View file

@ -0,0 +1,32 @@
// Copyright (c) The Geekeey Authors
// SPDX-License-Identifier: EUPL-1.2
namespace Geekeey.Request.Validation;
/// <summary>
/// Represents the result of executing one or more validations against a given object or request.
/// </summary>
public sealed class Validation
{
/// <summary>
/// Represents the result of executing one or more validations against a given object or request.
/// </summary>
/// <remarks>
/// This class contains the list of validation problems identified during the validation process.
/// A validation is considered successful if no problems are found.
/// </remarks>
public Validation(IEnumerable<Problem> problems)
{
Problems = [.. problems];
}
/// <summary>
/// Whether the validation was successful.
/// </summary>
public bool IsValid => Problems.Count is 0;
/// <summary>
/// The problems that were found during validation.
/// </summary>
public IReadOnlyList<Problem> Problems { get; }
}