当前位置: 首页>>代码示例>>C#>>正文


C# IInventoryService.GetRootFolders方法代码示例

本文整理汇总了C#中IInventoryService.GetRootFolders方法的典型用法代码示例。如果您正苦于以下问题:C# IInventoryService.GetRootFolders方法的具体用法?C# IInventoryService.GetRootFolders怎么用?C# IInventoryService.GetRootFolders使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IInventoryService的用法示例。


在下文中一共展示了IInventoryService.GetRootFolders方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetInventoryLibrary

        /// <summary>
        /// Converts the inventory library skeleton into the form required by the rpc request.
        /// </summary>
        /// <returns></returns>
        protected virtual ArrayList GetInventoryLibrary(ILibraryService library, IInventoryService inventoryService)
        {
            ArrayList AgentInventoryArray = new ArrayList();
            List<InventoryFolderBase> rootFolders = inventoryService.GetRootFolders(library.LibraryOwner);
            Hashtable RootHash = new Hashtable();
            RootHash["name"] = library.LibraryName;
            RootHash["parent_id"] = UUID.Zero.ToString();
            RootHash["version"] = (Int32)1;
            RootHash["type_default"] = (Int32)9;
            RootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
            AgentInventoryArray.Add(RootHash);

            List<UUID> rootFolderUUIDs = new List<UUID>();
            foreach (InventoryFolderBase rootFolder in rootFolders)
            {
                if (rootFolder.Name != "My Inventory")
                    rootFolderUUIDs.Add(rootFolder.ID);
            }

            if (rootFolderUUIDs.Count != 0)
            {
                foreach (UUID rootfolderID in rootFolderUUIDs)
                {
                    TraverseFolder(library.LibraryOwner, rootfolderID, inventoryService, true, ref AgentInventoryArray);
                }
            }
            return AgentInventoryArray;
        }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:32,代码来源:LLLoginResponse.cs

示例2: GetInventoryLibrary

        /// <summary>
        ///     Converts the inventory library skeleton into the form required by the rpc request.
        /// </summary>
        /// <returns></returns>
        protected virtual ArrayList GetInventoryLibrary(ILibraryService library, IInventoryService inventoryService)
        {
            ArrayList AgentInventoryArray = new ArrayList();
            List<InventoryFolderBase> rootFolders = inventoryService.GetRootFolders(library.LibraryOwner);
            Hashtable RootHash = new Hashtable();
            RootHash["name"] = library.LibraryName;
            RootHash["parent_id"] = UUID.Zero.ToString();
            RootHash["version"] = 1;
            RootHash["type_default"] = 8;
            RootHash["folder_id"] = library.LibraryRootFolderID.ToString();
            AgentInventoryArray.Add(RootHash);

            List<UUID> rootFolderUUIDs =
                (from rootFolder in rootFolders where rootFolder.Name != "My Inventory" select rootFolder.ID).ToList();

            if (rootFolderUUIDs.Count != 0)
            {
                foreach (UUID rootfolderID in rootFolderUUIDs)
                {
                    TraverseFolder(library.LibraryOwner, rootfolderID, inventoryService, library, true,
                                   ref AgentInventoryArray);
                }
            }
            return AgentInventoryArray;
        }
开发者ID:hack13,项目名称:WhiteCore-Dev,代码行数:29,代码来源:LLLoginResponse.cs

示例3: GetInventorySkeleton

        private InventoryData GetInventorySkeleton(ILibraryService library, IInventoryService inventoryService, List<InventoryFolderBase> folders)
        {
            UUID rootID = UUID.Zero;
            ArrayList AgentInventoryArray = new ArrayList();
            Hashtable TempHash;
            foreach (InventoryFolderBase InvFolder in folders)
            {
                if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory")
                {
                    rootID = InvFolder.ID;
                }
                TempHash = new Hashtable();
                TempHash["name"] = InvFolder.Name;
                TempHash["parent_id"] = InvFolder.ParentID.ToString();
                TempHash["version"] = (Int32)InvFolder.Version;
                TempHash["type_default"] = (Int32)InvFolder.Type;
                TempHash["folder_id"] = InvFolder.ID.ToString();
                AgentInventoryArray.Add(TempHash);
            }

            List<InventoryFolderBase> rootFolders = inventoryService.GetRootFolders(library.LibraryOwner);
            Hashtable RootHash = new Hashtable();
            RootHash["name"] = library.LibraryName;
            RootHash["parent_id"] = UUID.Zero.ToString();
            RootHash["version"] = (Int32)1;
            RootHash["type_default"] = (Int32)9;
            RootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
            AgentInventoryArray.Add(RootHash);

            List<UUID> rootFolderUUIDs = new List<UUID>();
            foreach (InventoryFolderBase rootFolder in rootFolders)
            {
                if (rootFolder.Name != "My Inventory")
                {
                    rootFolderUUIDs.Add(rootFolder.ID);
                }
            }

            if (rootFolderUUIDs.Count != 0)
            {
                foreach (UUID rootfolderID in rootFolderUUIDs)
                {
                    TraverseFolder(library.LibraryOwner, rootfolderID, inventoryService, true, ref AgentInventoryArray);
                }
            }
            return new InventoryData(AgentInventoryArray, rootID);

        }
开发者ID:x8ball,项目名称:Aurora-Sim,代码行数:48,代码来源:LLLoginResponse.cs


注:本文中的IInventoryService.GetRootFolders方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。