Fun.FunapiNetwork.GetMessage C# (CSharp) Method

GetMessage() public method

public GetMessage ( FunMessage msg, MessageType msg_type ) : object
msg FunMessage
msg_type MessageType
return object
        public object GetMessage(FunMessage msg, MessageType msg_type)
        {
            object _msg = null;
            bool success = Extensible.TryGetValue(serializer_, MessageTable.GetType(msg_type), msg,
                                                  (int)msg_type, DataFormat.Default, true, out _msg);
            if (!success)
            {
                DebugUtils.Log("Failed to decode {0} {1}", MessageTable.GetType(msg_type), (int)msg_type);
                return null;
            }

            return _msg;
        }