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


C# GridInstantMessage.ToOSD方法代码示例

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


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

示例1: AddOfflineMessage

 public bool AddOfflineMessage(GridInstantMessage message)
 {
     foreach (string m_ServerURI in m_ServerURIs)
     {
         SimianUtils.AddGeneric(message.toAgentID, "OfflineMessages", UUID.Random().ToString(), message.ToOSD(),
                                m_ServerURI);
     }
     return true;
 }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:9,代码来源:SimianOfflineMessagesConnector.cs

示例2: ConvertGridInstantMessageToXMLRPC

 /// <summary>
 /// Takes a GridInstantMessage and converts it into a Hashtable for XMLRPC
 /// </summary>
 /// <param name="msg">The GridInstantMessage object</param>
 /// <returns>Hashtable containing the XMLRPC request</returns>
 protected virtual Hashtable ConvertGridInstantMessageToXMLRPC(GridInstantMessage msg)
 {
     Hashtable gim = new Hashtable ();
     gim["message"] = OSDParser.SerializeJsonString (msg.ToOSD ());
     return gim;
 }
开发者ID:skidzTweak,项目名称:HyperGrid,代码行数:11,代码来源:InstantMessageHandler.cs

示例3: AddOfflineMessage

        public bool AddOfflineMessage(GridInstantMessage message)
        {
            object remoteValue = DoRemote(message);
            if (remoteValue != null || m_doRemoteOnly)
                return remoteValue == null ? false : (bool)remoteValue;

            if (message.fromGroup)
            {
                if (!m_saveGroupOfflineMessages)
                    return false;
                if (m_maxGroupOfflineMessages <= 0 ||
                    GenericUtils.GetGenericCount(message.toAgentID, "GroupOfflineMessages", GD) < m_maxOfflineMessages)
                {
                    GenericUtils.AddGeneric(message.toAgentID, "GroupOfflineMessages", UUID.Random().ToString(),
                                            message.ToOSD(), GD);
                    return true;
                }
            }
            else
            {
                if (m_maxOfflineMessages <= 0 ||
                    GenericUtils.GetGenericCount(message.toAgentID, "OfflineMessages", GD) < m_maxOfflineMessages)
                {
                    GenericUtils.AddGeneric(message.toAgentID, "OfflineMessages", UUID.Random().ToString(),
                                            message.ToOSD(), GD);
                    return true;
                }
            }
            return false;
        }
开发者ID:nathanmarck,项目名称:Aurora-Sim,代码行数:30,代码来源:LocalOfflineMessagesConnector.cs

示例4: FriendshipOffered

        public static OSDMap FriendshipOffered(UUID requester, UUID friend, GridInstantMessage im,
                                               ulong requestingRegion)
        {
            OSDMap llsdBody = new OSDMap
                                  {
                                      {"Requester", requester},
                                      {"Friend", friend},
                                      {"IM", im.ToOSD()},
                                      {"RequestingRegion", requestingRegion}
                                  };

            return buildEvent("FriendshipOffered", llsdBody, requester, requestingRegion);
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:13,代码来源:SyncMessageHelper.cs

示例5: AddOfflineMessage

        public bool AddOfflineMessage(GridInstantMessage message)
        {
            OSDMap sendData = message.ToOSD();

            sendData["Method"] = "addofflinemessage";

            try
            {
                List<string> urls =
                    m_registry.RequestModuleInterface<IConfigurationService>().FindValueOf(
                        message.toAgentID.ToString(), "RemoteServerURI");
#if (!ISWIN)
                foreach (string url in urls)
                {
                    OSDMap result = WebUtils.PostToService(url + "osd", sendData, true, false);
                    return ((OSDMap) OSDParser.DeserializeJson(result["_RawResult"]))["Result"].AsBoolean();
                }
#else
                foreach (OSDMap result in urls.Select(url => WebUtils.PostToService(url + "osd", sendData, true, false)))
                {
                    return ((OSDMap) OSDParser.DeserializeJson(result["_RawResult"]))["Result"].AsBoolean();
                }
#endif
            }
            catch (Exception e)
            {
                MainConsole.Instance.DebugFormat("[AuroraRemoteOfflineMessagesConnector]: Exception when contacting server: {0}", e);
            }
            return false;
        }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:30,代码来源:RemoteOfflineMessagesConnector.cs

示例6: AddOfflineMessage

 /// <summary>
 ///   Adds a new offline message for the user.
 /// </summary>
 /// <param name = "message"></param>
 public bool AddOfflineMessage(GridInstantMessage message)
 {
     if (message.fromGroup)
     {
         if (!m_saveGroupOfflineMessages)
             return false;
         if (m_maxGroupOfflineMessages <= 0 ||
             GenericUtils.GetGenericCount(message.toAgentID, "GroupOfflineMessages", GD) < m_maxOfflineMessages)
         {
             GenericUtils.AddGeneric(message.toAgentID, "GroupOfflineMessages", UUID.Random().ToString(),
                                     message.ToOSD(), GD);
             return true;
         }
     }
     else
     {
         if (m_maxOfflineMessages <= 0 ||
             GenericUtils.GetGenericCount(message.toAgentID, "OfflineMessages", GD) < m_maxOfflineMessages)
         {
             GenericUtils.AddGeneric(message.toAgentID, "OfflineMessages", UUID.Random().ToString(),
                                     message.ToOSD(), GD);
             return true;
         }
     }
     return false;
 }
开发者ID:satlanski2,项目名称:Aurora-Sim,代码行数:30,代码来源:LocalOfflineMessagesConnector.cs


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