Ejemplo n.º 1
0
 public Direction BestDirection()
 {
     var crimeFetcher = new CrimeFetcher();
     var crimelist = crimeFetcher.FetchCrimesNearLocation(location);
     if (crimelist.Count > 0)
     {
         NorthEastDirection northEastDirection = new NorthEastDirection(
             x => x.Location.Longitude > location.Longitude
                 && x.Location.Latitude > location.Latitude,
                 crimelist, location);
     }
     return new Direction()
     {
         Name = "North East",
         Bearing = 45,
         Count = 5
     };
 }
Ejemplo n.º 2
0
        public Direction BestDirection()
        {
            var crimeFetcher = new CrimeFetcher();
            var crimelist    = crimeFetcher.FetchCrimesNearLocation(location);

            if (crimelist.Count > 0)
            {
                NorthEastDirection northEastDirection = new NorthEastDirection(
                    x => x.Location.Longitude > location.Longitude &&
                    x.Location.Latitude > location.Latitude,
                    crimelist, location);
            }
            return(new Direction()
            {
                Name = "North East",
                Bearing = 45,
                Count = 5
            });
        }