/// <summary> /// Returns a root element <see cref="TreeViewItem"/> for a <see cref="ValidationLogTreeView"/> where /// the grouping mode is determined by <see cref="LogGroupingMode"/> <paramref name="mode"/> and the /// values are based on a collection of <see cref="ValidationLog"/>(s) in <paramref name="logs"/>. /// </summary> /// <param name="mode"></param> /// <param name="logs"></param> /// <returns></returns> public static TreeViewItem CreateTreeByGroupType(LogGroupingMode mode, IReadOnlyList <ValidationLog> logs) { switch (mode) { case LogGroupingMode.CollapseByValidatorType: return(CreateTreeGroupedByValidatorType(logs)); case LogGroupingMode.CollapseByArea: return(CreateTreeGroupedByArea(logs)); default: throw new ArgumentOutOfRangeException(Enum.GetName(typeof(LogGroupingMode), mode)); } }
/// <summary> /// Sets the <see cref="LogGroupingMode"/> <paramref name="mode"/> for how /// <see cref="ValidationLog"/>s will be grouped and rendered. /// </summary> /// <param name="mode"></param> public void SetGroupByMode(LogGroupingMode mode) { _logGroupingMode = mode; }