示例#1
0
        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);
        }
示例#2
0
        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>());
        }