private void OnChildrenChanged(object sender, ScopeNodeCollectionEventArgs e) { switch (e.ChangeType) { case ScopeNodeCollectionChangeType.Add: if (this._nodeSyncManager == null) { break; } this._nodeSyncManager.AddNodes(e.GetItems(), e.Index); return; case ScopeNodeCollectionChangeType.Remove: if (this._nodeSyncManager != null) { this._nodeSyncManager.RemoveNodes(e.GetItems()); } break; default: return; } }
internal void OnNodesChanged(object sender, ScopeNodeCollectionEventArgs e) { ScopeNode[] items = e.GetItems(); if (items.Length != 0) { switch (e.ChangeType) { case ScopeNodeCollectionChangeType.Add: this.AddNodes(items, e.Index); return; case ScopeNodeCollectionChangeType.Remove: this.RemoveNodes(items); return; } } }