Ejemplo n.º 1
0
 public void UpdatePrice(Airport airport, ScalePrice scalePrice)
 {
     if (!_prices.ContainsKey(airport))
     {
         _prices.Add(airport, scalePrice);
     }
     else
     {
         _prices[airport] = scalePrice;
     }
 }
Ejemplo n.º 2
0
        public ScalePrice QueryPrice(Airport airport)
        {
            ScalePrice result;

            if (!_prices.ContainsKey(airport))
            {
                result = new ScalePrice(null, decimal.MaxValue);
                _prices.Add(airport, result);
            }
            else
            {
                result = _prices[airport];
            }
            return(result);
        }