Beispiel #1
0
        public PedestrianDataContract AuthenticateAsPedestrian(PedestrianAuthenticationRequestDataContract request)
        {
            IPedestrianInfo pedestrianInfo = _server.CreatePedestrianInfo();

            ConvertHelper.FillPedestrianAuthenticationRequestInfo(pedestrianInfo, request);
            _server.AuthenticateAsPedestrian(pedestrianInfo, request.CityId);
            return(ConvertHelper.CreatePedestrianDataContract(pedestrianInfo));
        }
Beispiel #2
0
        public IEnumerable <PedestrianDataContract> EnumeratePedestrians(Guid cityId)
        {
            ICityLogic city = _server.Cities.FirstOrDefault(c => c.Info.Id == cityId);

            return(cityId == null ? new PedestrianDataContract[0] : city.Pedestrians.Select(p => ConvertHelper.CreatePedestrianDataContract(p)).ToArray());
        }