public Sidebar(Sidebars sidebars, SidebarAnchor anchor) { this.sidebars = sidebars; this.anchor = anchor; e = new EventWrapper(this); }
protected Widget(TCanvas canvas, TItem item) { Ensure.That(nameof(canvas)).IsNotNull(canvas); Ensure.That(nameof(item)).IsNotNull(item); this.canvas = canvas; this.item = item; e = new EventWrapper(GetType()); // Micro optimization hasDescriptor = item.HasDescriptor(); if (hasDescriptor) { DescriptorProvider.instance.AddListener(item, CacheDescription); } }
protected Canvas(TGraph graph) { Ensure.That(nameof(graph)).IsNotNull(graph); this.graph = graph; e = new EventWrapper(GetType()); selection = new GraphSelection(); widgetProvider = new WidgetProvider(this); graph.elements.CollectionChanged += Recollect; widgets = new WidgetList <IWidget>(this); elementWidgets = new WidgetList <IGraphElementWidget>(this); widgetsByAscendingZ = new WidgetList <IWidget>(this); visibleWidgetsByAscendingZ = new WidgetList <IWidget>(this); visibleWidgetsByDescendingZ = new WidgetList <IWidget>(this); }