コード例 #1
0
        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="map">An <see cref="OSDMap"/> containing the data</param>
        public void Deserialize(OSDMap map)
        {
            if (map.ContainsKey("method") && map["method"].AsString().Equals("start conference"))
                Request = new ChatSessionRequestStartConference();
            else if (map.ContainsKey("method") && map["method"].AsString().Equals("mute update"))
                Request = new ChatSessionRequestMuteUpdate();
            else if (map.ContainsKey("method") && map["method"].AsString().Equals("accept invitation"))
                Request = new ChatSessionAcceptInvitation();
            else
                Logger.Log("Unable to deserialize ChatSessionRequest: No message handler exists for method " + map["method"].AsString(), Helpers.LogLevel.Warning);

            Request.Deserialize(map);
        }