예제 #1
0
 public static string ToPrettyString(this IThing thing) =>
 thing.MapThing(
     s => $"{s.Title} ({s.Subsections.Length.ToString()})",
     ss => $"{ss.Title} ({ss.Clauses.Length.ToString()})",
     c => $"{c.Title} ({c.Subclauses.Length.ToString()})",
     sc => $"{sc.Title}"
     );
예제 #2
0
 public static IEnumerable <IThing> GetChildren(this IThing thing) =>
 thing.MapThing(
     s => s.Subsections as IEnumerable <IThing>,
     ss => ss.Clauses as IEnumerable <IThing>,
     c => c.Subclauses as IEnumerable <IThing>,
     sc => EMPTY_THING
     );