feat: create request projects for basic CQRS
This commit is contained in:
commit
d614788e06
190 changed files with 12236 additions and 0 deletions
20
src/request.result/IResultFactory.cs
Normal file
20
src/request.result/IResultFactory.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace Geekeey.Request.Result;
|
||||
|
||||
/// <summary>
|
||||
/// An interface for a result.
|
||||
/// </summary>
|
||||
[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords")]
|
||||
public interface IResultFactory<out TSelf> where TSelf : IResultFactory<TSelf>
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new result with a failure value.
|
||||
/// </summary>
|
||||
/// <param name="error">The error of the result.</param>
|
||||
/// <returns>A new result with a failure value.</returns>
|
||||
static abstract TSelf Failure(Error error);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue