Ejemplo n.º 1
0
        public bool DeleteLense(string lense)
        {
            var item = Lenses.Find(l => (l.Name == lense));

            if (item != null)
            {
                Lenses.Remove(item);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 2
0
        public bool AddLense(Lense newLense)
        {
            var lense = Lenses.Find(l => (l.Factor == newLense.Factor));

            if (lense == null)
            {
                //create a new lense
                Lenses.Add(newLense);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
 public Lense GetLense(string lense)
 {
     return(Lenses.Find(l => (l.ToString() == lense)));
 }