internal FunctionalEventTracingArgs(FunctionalElementRoute eventRoute) { if (eventRoute == null) throw new ArgumentNullException("eventRoute", "eventRoute is null."); Route = eventRoute; }
private FunctionalElementRoute BuildSpreadEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); IFunctionalTreeElement treeRoot = FunctionalTreeHelper.GetFunctionalTree(element).Root; route.Add(treeRoot); route.AddRange(GetDescendents(treeRoot)); return route; }
private FunctionalElementRoute BuildSiblingsEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); IFunctionalTreeElement parent = FunctionalTreeHelper.GetFunctionalParent(element); if (parent == null) return route; route.AddRange(FunctionalTreeHelper.GetFunctionalChildren(parent).Where(cur => cur != element)); return route; }
private FunctionalElementRoute BuildParentEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); route.Add(FunctionalTreeHelper.GetFunctionalParent(element)); return route; }
private FunctionalElementRoute BuildDescendentsEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); route.AddRange(GetDescendents(element)); return route; }
private FunctionalElementRoute BuildChildrenEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); route.AddRange(FunctionalTreeHelper.GetFunctionalChildren(element)); return route; }
private FunctionalElementRoute BuildBubbleEventRoute(IFunctionalTreeElement element, FunctionalEventArgs eventArgs) { FunctionalElementRoute route = new FunctionalElementRoute(); IFunctionalTreeElement curElement = element; while (curElement != null) { route.Add(curElement); curElement = FunctionalTreeHelper.GetFunctionalParent(curElement); } return route; }