Ejemplo n.º 1
0
        public override void LoadChildren()
        {
            var nodes   = new List <ISPNode>(NodeProvider.LoadChildren(this));
            var folders = nodes.OfType <SPFolderCollectionNode>().FirstOrDefault();

            if (folders != null)
            {
                Children.AddRange(NodeProvider.LoadCollectionChildren(folders, int.MaxValue));
                nodes.Remove(folders);
            }

            var files = nodes.OfType <SPFileCollectionNode>().FirstOrDefault();

            if (files != null)
            {
                Children.AddRange(NodeProvider.LoadCollectionChildren(files, int.MaxValue));
                nodes.Remove(files);
            }

            Children.AddRange(nodes);
        }
Ejemplo n.º 2
0
        public override void LoadChildren()
        {
            if (SPObject == null)
            {
                return;
            }

            if (Children.Count > 0)
            {
                // Ensure that the last node is the "MoreNode".
                int     nodeIndex = Children.Count - 1;
                ISPNode node      = Children[nodeIndex];

                if (node is MoreNode)
                {
                    // Remove the "MoreNode" from this.Children.
                    Children.RemoveAt(nodeIndex);
                }
            }
            else
            {
                ClearChildren();
                EnsureNodeTypes();
            }
#if DEBUG
            var watch = new Stopwatch();
            watch.Start();
#endif
            // Load the next batch!
            Children.AddRange(NodeProvider.LoadCollectionChildren(this));

#if DEBUG
            watch.Stop();
            Trace.WriteLine(String.Format("Load Properties: Type:{0} - Time {1} milliseconds.",
                                          SPObjectType.Name, watch.ElapsedMilliseconds));
#endif
        }
 public override void LoadChildren()
 {
     Children.AddRange(NodeProvider.LoadCollectionChildren(this, int.MaxValue));
 }
Ejemplo n.º 4
0
        public override void LoadChildren()
        {
            var settings = NodeProvider.IoCContainer.Resolve <SPExplorerSettings>();

            Children.AddRange(NodeProvider.LoadCollectionChildren(this, settings.BatchNodeLoad));
        }