mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:26:31 +00:00
067f02cc63
rework AIAvailabilityStatus events to mediatr
14 lines
585 B
C#
14 lines
585 B
C#
using MediatR;
|
|
|
|
namespace Azaion.Common.Services;
|
|
|
|
public class GPSMatcherEventHandler(IGpsMatcherService gpsMatcherService) :
|
|
INotificationHandler<GPSMatcherResultEvent>,
|
|
INotificationHandler<GPSMatcherFinishedEvent>
|
|
{
|
|
public async Task Handle(GPSMatcherResultEvent result, CancellationToken cancellationToken) =>
|
|
await gpsMatcherService.SetGpsResult(result, cancellationToken);
|
|
|
|
public async Task Handle(GPSMatcherFinishedEvent notification, CancellationToken cancellationToken) =>
|
|
await gpsMatcherService.FinishGPS(notification, cancellationToken);
|
|
} |