Esempio n. 1
0
 public List <ModelName> ModelNames; // how about map?
 public bool Add(ModelName model)
 {
     if (ModelNames.Any(x => x.Name == model.Name))
     {
         ModelName currModelName = ModelNames.First(x => x.Name == model.Name);
         return(currModelName.Add(model.GetFirstDevice()));
     }
     else
     {
         ModelNames.Add(model);
     }
     return(true);
 }