Skip to content

Commit

Permalink
Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Feb 12, 2025
1 parent d17df13 commit 6ab34b7
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Shiny.Mediator/Infrastructure/Impl/Mediator.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using Microsoft.Extensions.DependencyInjection;

namespace Shiny.Mediator.Infrastructure.Impl;


Expand All @@ -6,4 +8,43 @@ public partial class Mediator(
IEnumerable<IEventCollector> collectors
) : IMediator
{
// public async Task<MediatorResult> Request<TResult>(
// IRequest<TResult> request,
// CancellationToken cancellationToken = default,
// params IEnumerable<(string Key, object Value)> headers
// )
// {
// try
// {
// var context = await this
// .RequestWithContext(request, cancellationToken, headers)
// .ConfigureAwait(false);
//
// // TODO: this gets me nothing that the context didn't already have... however, I'm returning a loose object, so I can transform
// // the result now
// return new MediatorResult(
// request,
// context.Result,
// null,
// context.Context
// );
// }
// catch (Exception ex)
// {
// // TODO: could apply different exception handler allowing Result to set/handled
// return new MediatorResult(
// request,
// null,
// ex,
// null // TODO: context is lost and shouldn't be on exceptions
// );
// }
// }
//
// public record MediatorResult(
// object Contract,
// object? Result,
// Exception? Exception,
// IMediatorContext Context
// );
}

0 comments on commit 6ab34b7

Please sign in to comment.