public void Search(IFareSearchProvider fareSearchProvider, IFareAlertNotificationService fareAlertNotificationService) { Contract.Requires <ArgumentNullException>(fareSearchProvider != null, InfrastructureResource.InvalidFareSearchProvider); Contract.Requires <ArgumentNullException>(fareAlertNotificationService != null, InfrastructureResource.InvalidFareAlertNotificationService); fareSearchProvider.Search(GetAlerts(), fareAlertNotificationService); }
public void Search(IEnumerable <FareAlert> fareAlerts, IFareAlertNotificationService fareAlertNotificationService) { Contract.Requires <ArgumentNullException>(fareAlerts != null, ModelResource.InvalidFareAlert); Contract.Requires <ArgumentNullException>(fareAlerts.All(fa => fa != null), ModelResource.InvalidFareAlert); Contract.Requires <ArgumentNullException>(fareAlertNotificationService != null, InfrastructureResource.InvalidFareAlertNotificationService); fareAlertNotificationService.Send(new List <FareSearchResult>()); }