From ac4c4cb69a4f8b08b711bed00e140056a50d1dc4 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 17 Dec 2025 10:41:04 +0100 Subject: [PATCH] Add generic scoped request interfaces for MediatR support Introduced IScopedRequestBase, IScopedRequest, and IScopedRequest interfaces to enable requests with scope information. These interfaces extend MediatR's IRequest types and enforce non-nullable scope types for improved request handling. --- .../Common/Interfaces/IScopedRequest.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/ReC.Application/Common/Interfaces/IScopedRequest.cs diff --git a/src/ReC.Application/Common/Interfaces/IScopedRequest.cs b/src/ReC.Application/Common/Interfaces/IScopedRequest.cs new file mode 100644 index 0000000..cb5d2ee --- /dev/null +++ b/src/ReC.Application/Common/Interfaces/IScopedRequest.cs @@ -0,0 +1,16 @@ +using MediatR; + +namespace ReC.Application.Common.Interfaces; + +public interface IScopedRequestBase where TScope : notnull +{ + public TScope Scope { get; } +} + +public interface IScopedRequest : IRequest, IScopedRequestBase where TScope : notnull +{ +} + +public interface IScopedRequest : IRequest, IScopedRequestBase where TScope : notnull +{ +} \ No newline at end of file