public List <UMUpdate> WittleDown(UMProducts prod, Architectures?arcs, bool super, bool appr, bool decline) { var list = new List <UMUpdate>(); var info = new UMProductInfo(prod, arcs, super, appr, decline); for (int i = 0; i < UMContext.AllUpdates.Count; i++) { var up = UMContext.AllUpdates[i]; if (up.MatchesInfo(info)) { list.Add(up); } } return(list); }
public ArchitectureParameter(UMProducts[] prods = null) : base(pName, type) { var list = new List <string>(); if (prods != null) { for (int d = 0; d < prods.Length; d++) { UMProducts p = prods[d]; var pi = new UMProductInfo(p, null, false, false, false); list.AddRange(pi.AllowedPlatforms); } } if (enumValues == null) { enumValues = typeof(Architectures).GetEnumValues(); } var strArr = new List <string>(); for (int i = 0; i < enumValues.Length; i++) { var arc = (Architectures)enumValues.GetValue(i); strArr.Add(info.GetNameAttribute(arc)); } for (int t = 0; t < list.Count; t++) { var inf = list[t]; for (int f = strArr.Count - 1; f >= 0; f--) { var s = strArr[f]; if (!list.Contains(s)) { strArr.Remove(s); } } } ValidatedItems = strArr.ToArray(); Aliases = new string[1] { "arc" }; SetParameterAttributes(atts); AllowNull = true; CommitAttributes(); }