//adds a facility to the configuration
        public void addFacility(RouteFacility facility)
        {
            if (this.Facilities.Exists(f => f.Type == facility.Type))
                this.Facilities.RemoveAll(f => f.Type == facility.Type);

            this.Facilities.Add(facility);
        }
        //adds a facility to the configuration
        public void addFacility(RouteFacility facility)
        {
            if (this.Facilities.Exists(f => f.Type == facility.Type))
            {
                this.Facilities.RemoveAll(f => f.Type == facility.Type);
            }

            this.Facilities.Add(facility);
        }
Beispiel #3
0
 //adds a facility to the list
 public static void AddFacility(RouteFacility facility)
 {
     facilities.Add(facility);
 }
Beispiel #4
0
 //returns all route facilities for a given airline and type
 public static List<RouteFacility> GetRouteFacilities(Airline airline, RouteFacility.FacilityType type)
 {
     return RouteFacilities.GetFacilities(type).FindAll(f => f.Requires == null || airline.Facilities.Contains(f.Requires));
 }
        public MVVMRouteFacility(RouteFacility.FacilityType type)
        {
            this.Facilities = new List<RouteFacility>();

            this.Type = type;
        }
 //returns the facility for a specific type
 public RouteFacility getFacility(RouteFacility.FacilityType type)
 {
     return this.Facilities.Find(f => f.Type == type);
 }
Beispiel #7
0
 //returns all facilities for a specific type
 public static List<RouteFacility> GetFacilities(RouteFacility.FacilityType type)
 {
     return facilities.FindAll(f => f.Type == type);
 }
Beispiel #8
0
 //returns the basic facility for a specific type
 public static RouteFacility GetBasicFacility(RouteFacility.FacilityType type)
 {
     return facilities.FindAll(f => f.Type == type).OrderBy(f => f.ServiceLevel).First();
 }
Beispiel #9
0
 //adds a facility to the list
 public static void AddFacility(RouteFacility facility)
 {
     facilities.Add(facility);
 }
        public AirlineClassFacilityMVVM(RouteFacility.FacilityType type)
        {
            this.Facilities = new List<RouteFacility>();

            this.Type = type;
        }
Beispiel #11
0
        public AirlineClassFacilityMVVM(RouteFacility.FacilityType type)
        {
            this.Facilities = new ObservableCollection<RouteFacility>();

            this.Type = type;

        }