Example #1
0
        private void LoadDatabases([NotNull] IEnumerable <DatabaseInfo> databases, [NotNull] GetChildrenDelegate callback)
        {
            Debug.ArgumentNotNull(databases, nameof(databases));
            Debug.ArgumentNotNull(callback, nameof(callback));

            var result = new List <BaseTreeViewItem>();

            foreach (var databaseInfo in databases)
            {
                if (databaseInfo.DatabaseName.ToString() == @"filesystem")
                {
                    continue;
                }

                var item = new DatabaseTreeViewItem(new DatabaseUri(Site, databaseInfo.DatabaseName))
                {
                    Text = databaseInfo.DatabaseName.ToString()
                };

                item.MakeExpandable();
                result.Add(item);
            }

            callback(result);
        }
        BaseTreeViewItem IScopeable.GetScopedTreeViewItem()
        {
            var result = new DatabaseTreeViewItem(DatabaseUri)
            {
                Text = Text
            };

            result.MakeExpandable();

            return(result);
        }