Exemplo n.º 1
0
        public ShipAdapter(Activity activity, IEnumerable <Ship> ships)
        {
            _items   = ships.OrderBy(x => x.VehicleId).ThenBy(x => x.Nation).ToList();
            _context = activity;

            Filter = new ShipFilter(this);
        }
Exemplo n.º 2
0
        public static List <ShipTemplate> GetAllShipsThatMatch(ShipFilter filter)
        {
            if (filter == null)
            {
                return(GetAllShips());
            }

            return(GetAllShips().FindAll((x) => filter(x)));
        }