diff --git a/Realtime/Internal/Controller/LCIMMessageController.cs b/Realtime/Internal/Controller/LCIMMessageController.cs index 1ec3524..84cb35a 100644 --- a/Realtime/Internal/Controller/LCIMMessageController.cs +++ b/Realtime/Internal/Controller/LCIMMessageController.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using System.Collections.Generic; using Newtonsoft.Json; using Google.Protobuf; -using LeanCloud.Storage.Internal; using LeanCloud.Realtime.Protocol; namespace LeanCloud.Realtime.Internal.Controller { diff --git a/Realtime/Message/LCIMBinaryMessage.cs b/Realtime/Message/LCIMBinaryMessage.cs index 6b590bf..d0af326 100644 --- a/Realtime/Message/LCIMBinaryMessage.cs +++ b/Realtime/Message/LCIMBinaryMessage.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; - -namespace LeanCloud.Realtime { +namespace LeanCloud.Realtime { public class LCIMBinaryMessage : LCIMMessage { public byte[] Data { get; internal set; diff --git a/Realtime/Message/LCIMFileMessage.cs b/Realtime/Message/LCIMFileMessage.cs index 7a4375e..c06c38e 100644 --- a/Realtime/Message/LCIMFileMessage.cs +++ b/Realtime/Message/LCIMFileMessage.cs @@ -37,6 +37,8 @@ namespace LeanCloud.Realtime { File = file; } + internal override int MessageType => FileMessageType; + internal override Dictionary Encode() { if (File == null) { throw new Exception("File MUST NOT be null before sent."); @@ -73,7 +75,5 @@ namespace LeanCloud.Realtime { File.MetaData = metaData as Dictionary; } } - - internal override int MessageType => FileMessageType; } } diff --git a/Realtime/Message/LCIMLocationMessage.cs b/Realtime/Message/LCIMLocationMessage.cs index 848e820..ffe60c1 100644 --- a/Realtime/Message/LCIMLocationMessage.cs +++ b/Realtime/Message/LCIMLocationMessage.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Newtonsoft.Json; using LeanCloud.Storage; namespace LeanCloud.Realtime { diff --git a/Realtime/Message/LCIMMessage.cs b/Realtime/Message/LCIMMessage.cs index 3337dec..2c6e70a 100644 --- a/Realtime/Message/LCIMMessage.cs +++ b/Realtime/Message/LCIMMessage.cs @@ -1,7 +1,5 @@ using System; -using System.Linq; using System.Collections.Generic; -using LeanCloud.Realtime.Protocol; namespace LeanCloud.Realtime { public abstract class LCIMMessage { diff --git a/Realtime/Message/LCIMRecalledMessage.cs b/Realtime/Message/LCIMRecalledMessage.cs index 45657b7..a54d243 100644 --- a/Realtime/Message/LCIMRecalledMessage.cs +++ b/Realtime/Message/LCIMRecalledMessage.cs @@ -1,5 +1,4 @@ -using System; - + namespace LeanCloud.Realtime { public class LCIMRecalledMessage { public LCIMRecalledMessage() { diff --git a/Realtime/Message/LCIMTextMessage.cs b/Realtime/Message/LCIMTextMessage.cs index bf831b3..8a8ba8c 100644 --- a/Realtime/Message/LCIMTextMessage.cs +++ b/Realtime/Message/LCIMTextMessage.cs @@ -21,13 +21,13 @@ namespace LeanCloud.Realtime { return data; } + internal override int MessageType => TextMessageType; + protected override void DecodeMessageData(Dictionary msgData) { base.DecodeMessageData(msgData); if (msgData.TryGetValue("_lctext", out object value)) { Text = value as string; } } - - internal override int MessageType => TextMessageType; } }