private static IEnumerable<string> AddChildrenPartForFindMissing(ParseTO child) { List<string> results = new List<string>(); if(child != null) { results.Add(DataListUtil.AddBracketsToValueIfNotExist(child.Payload)); if(child.Child != null) { results.AddRange(AddChildrenPart(child.Child).Select(DataListUtil.AddBracketsToValueIfNotExist)); } } return results; }
static void AddPart(ParseTO part, List<string> allValidRegions) { if(string.IsNullOrEmpty(part.Payload) && part.Child == null) { allValidRegions.Add(string.Concat("[[", part.Payload, "]]")); } if(!string.IsNullOrEmpty(part.Payload)) { allValidRegions.Add(string.Concat("[[", part.Payload, "]]")); } }