private void ListView_IBusObjectClick(object sender, ItemClickEventArgs e) { IBusObject busObject = e.ClickedItem as IBusObject; var model = new InterfaceListModel { Service = VM.Service, Interfaces = busObject.Interfaces }; this.Frame.Navigate(typeof(InterfaceListPage), model); }
public MyBusObject(IBusObject busObject) { Path = busObject.Path; if (busObject.Interfaces == null) { this.Interfaces = null; return; } this.Interfaces = new List <IInterface>(); foreach (var i in busObject.Interfaces) { Interfaces.Add(new MyInterface(i)); } }
private static void DFS(IBusObject busObject, ICollection <IBusObject> allObjects, ICollection <string> seenPaths) { if (seenPaths.Contains(busObject.Path)) { return; } allObjects.Add(busObject); seenPaths.Add(busObject.Path); try { foreach (IBusObject child in busObject.ChildObjects) { DFS(child, allObjects, seenPaths); } } catch (Exception ex) { Logger.LogException("AllObjects (DFS): " + busObject.Path, ex); // DEMO TEMP FIX: throw; } }