Exemplo n.º 1
0
        protected override ItemInfo GetItem(ListInfo list, string path)
        {
            var fullPath = PathUtility.JoinPath(list.Path, path);

            return((ItemInfo)Cache.GetObjectOrDefault(fullPath) ??
                   GetItemDirectly(list, path));
        }
Exemplo n.º 2
0
        protected override bool HasItem(ListInfo list, string path)
        {
            if (path.EndsWith("/*"))
            {
                var parent = PathUtility.JoinPath(list.Path, PathUtility.GetParentPath(path));
                if (parent.IsEmpty())
                {
                    return(list.HasChildren());
                }
            }
            var fullPath = PathUtility.JoinPath(list.Path, path);

            if (Cache.GetObjectOrDefault(fullPath) == null)
            {
                try {
                    var container = GetItemDirectly(list, path) as ContainerInfo;
                    if (container == null)
                    {
                        return(false);
                    }
                    return(container.HasChildren());
                } catch {
                    return(false);
                }
            }
            return(true);
        }
Exemplo n.º 3
0
        protected override WebFolderInfo InferWebFolder(WebInfo web, string name)
        {
            var path = PathUtility.JoinPath(web.Path, name);

            return((WebFolderInfo)Cache.GetObjectOrDefault(path) ??
                   InferWebFolderDirectly(web, name));
        }
Exemplo n.º 4
0
        // Implementation of the NavigatingConnector interface support from the parent class.
        // They look for their result first to the cache because they can be called multiple
        // times by the code in the connector, the drive provider or the originating cmdlet.

        protected override WebInfo GetWeb(string path)
        {
            return((WebInfo)Cache.GetObjectOrDefault(path) ?? GetWebDirectly(path));
        }
Exemplo n.º 5
0
        // Reimplementation of the internal object access to utilize caching.

        protected override Info ExistsObjectInternal(string path)
        {
            return(Cache.GetObjectOrDefault(path) ?? base.ExistsObjectInternal(path));
        }