public ShipAdapter(Activity activity, IEnumerable <Ship> ships) { _items = ships.OrderBy(x => x.VehicleId).ThenBy(x => x.Nation).ToList(); _context = activity; Filter = new ShipFilter(this); }
public static List <ShipTemplate> GetAllShipsThatMatch(ShipFilter filter) { if (filter == null) { return(GetAllShips()); } return(GetAllShips().FindAll((x) => filter(x))); }