Exemple #1
0
        public DriverDataContract AuthenticateAsDriver(DriverAuthenticationRequestDataContract request)
        {
            IDriverInfo driverInfo = _server.CreateDriverInfo();

            ConvertHelper.FillDriverAuthenticationRequestInfo(driverInfo, request);
            _server.AuthenticateAsDriver(driverInfo, request.CityId);
            return(ConvertHelper.CreateDriverDataContract(driverInfo));
        }
Exemple #2
0
        public IEnumerable <DriverDataContract> EnumerateDrivers(Guid cityId)
        {
            ICityLogic city = _server.Cities.FirstOrDefault(c => c.Info.Id == cityId);

            return(cityId == null ? new DriverDataContract[0] : city.Drivers.Select(d => ConvertHelper.CreateDriverDataContract(d)).ToArray());
        }