예제 #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);
        }
예제 #2
0
        public static List <ShipTemplate> GetAllShipsThatMatch(ShipFilter filter)
        {
            if (filter == null)
            {
                return(GetAllShips());
            }

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