public static Task SubscribeEvents(this IServiceBusListenerFactory serviceBus, VehicleService vehicleService) => serviceBus.Create().SubscribeVehicleTrackSubscribe(t => vehicleService.Add(t.Ids));
public static Task SubscribeEvents(this IServiceBusListenerFactory listener, IStatusCache statusCache, VehicleSubscription vehicleSubscription) => listener.Create() .SubscribeVehicleInfo(t => statusCache.Update(t.Id, t)) .SubscribeVehicleInfo(vehicleSubscription.Send);
public static Task SubscribeEvents(this IServiceBusListenerFactory listener, IVehicleService vehicleService) => listener.Create().SubscribeVehicleTrackRequest(vehicleService.Ping);