本文整理汇总了C#中OpenSim.Framework.Capabilities.OSDMap.Clear方法的典型用法代码示例。如果您正苦于以下问题:C# OSDMap.Clear方法的具体用法?C# OSDMap.Clear怎么用?C# OSDMap.Clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Framework.Capabilities.OSDMap
的用法示例。
在下文中一共展示了OSDMap.Clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleFetchLib
public byte[] HandleFetchLib(string request, UUID AgentID)
{
try
{
//m_log.DebugFormat("[InventoryCAPS]: Received FetchLib request for {0}", AgentID);
OSDMap requestmap = (OSDMap)OSDParser.DeserializeLLSDXml(OpenMetaverse.Utils.StringToBytes(request));
OSDArray foldersrequested = (OSDArray)requestmap["items"];
OSDMap map = new OSDMap();
map.Add("agent_id", OSD.FromUUID(AgentID));
OSDArray items = new OSDArray();
for (int i = 0; i < foldersrequested.Count; i++)
{
OSDMap requestedFolders = (OSDMap)foldersrequested[i];
//UUID owner_id = requestedFolders["owner_id"].AsUUID();
UUID item_id = requestedFolders["item_id"].AsUUID();
OSDArray item = m_inventoryService.GetItem(item_id);
if(item != null && item.Count > 0)
items.Add(item[0]);
}
map.Add("items", items);
byte[] response = OSDParser.SerializeLLSDXmlBytes(map);
map.Clear();
return response;
}
catch (Exception ex)
{
m_log.Warn("[InventoryCaps]: SERIOUS ISSUE! " + ex.ToString());
}
OSDMap rmap = new OSDMap();
rmap["items"] = new OSDArray();
return OSDParser.SerializeLLSDXmlBytes(rmap);
}