private static void WriteAppXml( AppElemLocations appElemLocs, TextWriter writer) { writer.WriteLine("```xml"); writer.WriteLine(appElemLocs.Element.ToString()); writer.WriteLine("```"); writer.WriteLine(); }
private static bool IsFirstTarget(AppElemLocations a, AppElemLocations b) { // the widest range wins if (a.Locations.Length != b.Locations.Length) { return(a.Locations.Length > b.Locations.Length); } // or the one with highest children wins int aChildCount = a.Element.Elements().Count(); int bChildCount = b.Element.Elements().Count(); if (aChildCount != bChildCount) { return(aChildCount > bChildCount); } // or the first wins return(true); }