Exemplo n.º 1
0
        private static OrganizationInfo GetContainerOrganizationInfo(this Item item)
        {
            var organizationInfo          = new OrganizationInfo();
            var containerOrganizationInfo = item.Container.GetOrganizationInfo();

            organizationInfo.AddRange(containerOrganizationInfo.Select(node => new OrganizationInfo.Node(node.ItemInfo, node.RelativePath)));
            organizationInfo.Last().RelativePath = "./";
            return(organizationInfo);
        }
Exemplo n.º 2
0
        internal static OrganizationInfo GetOrganizationInfo(this Container organizationalContainer)
        {
            if (cache.ContainsKey(organizationalContainer))
            {
                return(cache[organizationalContainer]);
            }
            var organizationInfo          = new OrganizationInfo();
            var containerOrganizationInfo = organizationalContainer.Container.GetOrganizationInfo();

            organizationInfo.AddRange(containerOrganizationInfo.Select(node => new OrganizationInfo.Node(node.ItemInfo, "../" + node.RelativePath)));
            organizationInfo.Add(new OrganizationInfo.Node(organizationalContainer.GetItemInfo(), string.Empty));
            cache.Add(organizationalContainer, organizationInfo);
            return(organizationInfo);
        }