public PlacesController(IPlacesService placesService) { if (placesService == null) // Guard Clause { throw new ArgumentNullException("placesService"); } _placesService = placesService; }
private static IndexModel GetIndexModel(IPlacesService placesService, string userName) { var indexModel = new IndexModel(); indexModel.PageTitle = EnrollResources.PageTitle; indexModel.UserName = userName; indexModel.UserGenders = GetUserGenders(); indexModel.UserCountries = GetUserCountries(placesService); indexModel.UserReasons = GetUserReasons(); indexModel.MatchGenders = GetMatchGenders(); indexModel.MatchPlaces = GetMatchPlaces(); indexModel.MatchAges = GetMatchAges(); indexModel.MatchQuantities = GetMatchQuantities(); return indexModel; }
public PlacesController(IPlacesService places, IIdentifierProvider identifier) { this.places = places; this.identifier = identifier; }
public HomeController(IPlacesService placesService) { _placesService = placesService; }
public PlaceController(IPlacesService places, IIdentifierProvider identifier, ICountriesService countries) { this.places = places; this.countries = countries; this.identifier = identifier; }
public EnrollController(IPlacesService placesService) { if (placesService == null) throw new ArgumentNullException("placesService"); this.placesService = placesService; }
private static IEnumerable<SelectListItem> GetUserCountries(IPlacesService placesService) { return placesService.GetCountries().Select(a => new SelectListItem { Text = a.Name, Value = a.Id.ToString("D", CultureInfo.InvariantCulture) }); }
public AllPlacesController(IPlacesService places, ICountriesService countries) { this.places = places; this.countries = countries; }