public Component MakePatchAComponent(Patch aPatch) { RemovePatchFromTables(aPatch); VaccineAsString.AddComponent(aPatch.PatchPattern()); Component aComponent = Component.GetInstance(aPatch); Components.AddNew(aComponent); UpdateComponentTables(aComponent); return(aComponent); }
internal static VaccineAsString GetInstanceFromNice(string name, string nice) { string[] components = nice.Split(','); int max = 0; foreach (string component in components) { max = Math.Max(max, component.Length); } VaccineAsString aVaccineAsString = VaccineAsString.GetInstance(max, name); foreach (string component in components) { aVaccineAsString.AddComponent(component); } return(aVaccineAsString); }