diff --git a/README.md b/README.md index cae5e94..d0812a5 100644 --- a/README.md +++ b/README.md @@ -95,12 +95,9 @@ public sealed class SomeDataResponse ### 3. Write a Handler in Your Service to Fetch the Data Implement a handler to process data requests. For example: ```csharp -public class UserRequestHandler(IRequestClient client) - : IMappableRequestHandler +public class UserRequestHandler(): IMappableRequestHandler { - public async Task> RequestAsync( - RequestContext request, - CancellationToken cancellationToken = default) + public async Task> RequestAsync(RequestContext request) { // Implement data fetching logic here (e.g., via REST, RPC, or gRPC) } diff --git a/src/OfX.Tests/Handlers/UserRequestHandler.cs b/src/OfX.Tests/Handlers/UserRequestHandler.cs index cb6a332..f962f8c 100644 --- a/src/OfX.Tests/Handlers/UserRequestHandler.cs +++ b/src/OfX.Tests/Handlers/UserRequestHandler.cs @@ -1,16 +1,16 @@ -// using OfX.Abstractions; -// using OfX.Responses; -// using OfX.Tests.Attributes; -// using OfX.Tests.Models; -// -// namespace OfX.Tests.Handlers; -// -// public sealed class UserRequestHandler(IQueryOfHandler userQueryOf) -// : IMappableRequestHandler -// { -// public async Task> RequestAsync(RequestContext context) -// { -// var data = await userQueryOf.GetDataAsync(context); -// return data; -// } -// } \ No newline at end of file +using OfX.Abstractions; +using OfX.Responses; +using OfX.Tests.Attributes; +using OfX.Tests.Models; + +namespace OfX.Tests.Handlers; + +public sealed class UserRequestHandler(IQueryOfHandler userQueryOf) + : IMappableRequestHandler +{ + public async Task> RequestAsync(RequestContext context) + { + var data = await userQueryOf.GetDataAsync(context); + return data; + } +} \ No newline at end of file