/// <summary> /// Gets all defined area sections. /// </summary> /// <returns>List<LoadPattern>.</returns> public static List <AreaSection> GetAll() { List <AreaSection> objects = new List <AreaSection>(); List <string> names = GetNameList(); foreach (var name in names) { AreaSection areaSection = Factory(name); objects.Add(areaSection); } return(objects); }
public static AreaSection Factory(string uniqueName) { if (Registry.AreaSections.Keys.Contains(uniqueName)) { return(Registry.AreaSections[uniqueName]); } AreaSection areaSection = new AreaSection(uniqueName); if (_areaSection != null) { } Registry.AreaSections.Add(uniqueName, areaSection); return(areaSection); }