diff --git a/Libs/UnityEngine.dll b/Libs/UnityEngine.dll
deleted file mode 100644
index 80cf67e..0000000
Binary files a/Libs/UnityEngine.dll and /dev/null differ
diff --git a/Libs/websocket-sharp.dll b/Libs/websocket-sharp.dll
deleted file mode 100644
index 49661e8..0000000
Binary files a/Libs/websocket-sharp.dll and /dev/null differ
diff --git a/LiveQuery/LiveQuery.PCL/LiveQuery.PCL.csproj b/LiveQuery/LiveQuery.PCL/LiveQuery.PCL.csproj
deleted file mode 100644
index c6dd636..0000000
--- a/LiveQuery/LiveQuery.PCL/LiveQuery.PCL.csproj
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
- Debug
- AnyCPU
- {EA1C601E-D853-41F7-B9EB-276CBF7D1FA5}
- {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Library
- LiveQuery.PCL
- LiveQuery.PCL
- v4.5
- Profile111
- 0.1.0
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
-
-
- true
- bin\Release
- prompt
- 4
-
-
-
-
- Source\AVLiveQuery.cs
-
-
- Source\AVLiveQueryEventArgs.cs
-
-
- Source\AVLiveQueryExtensions.cs
-
-
-
-
- {92B2B40E-A3CD-4672-AC84-2E894E1A6CE5}
- RTM.PCL
-
-
- {659D19F0-9A40-42C0-886C-555E64F16848}
- Storage.PCL
-
-
-
-
\ No newline at end of file
diff --git a/LiveQuery/LiveQuery.PCL/Properties/AssemblyInfo.cs b/LiveQuery/LiveQuery.PCL/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5cf7adb..0000000
--- a/LiveQuery/LiveQuery.PCL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("LiveQuery.PCL")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("${AuthorCopyright}")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
diff --git a/LiveQuery/LiveQuery.Test/LiveQuery.Test.csproj b/LiveQuery/LiveQuery.Test/LiveQuery.Test.csproj
deleted file mode 100644
index c382c64..0000000
--- a/LiveQuery/LiveQuery.Test/LiveQuery.Test.csproj
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- Debug
- AnyCPU
- {F907012C-74DF-4575-AFE6-E8DAACC26D24}
- Library
- LiveQuery.Test
- LiveQuery.Test
- v4.7
- 0.1.0
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
-
-
- true
- bin\Release
- prompt
- 4
-
-
-
-
- ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LiveQuery/LiveQuery.Test/Test.cs b/LiveQuery/LiveQuery.Test/Test.cs
deleted file mode 100644
index 9bd89d3..0000000
--- a/LiveQuery/LiveQuery.Test/Test.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-using NUnit.Framework;
-using System;
-namespace LiveQuery.Test {
- [TestFixture()]
- public class Test {
- [Test()]
- public void TestCase() {
- }
- }
-}
diff --git a/LiveQuery/LiveQuery.Test/packages.config b/LiveQuery/LiveQuery.Test/packages.config
deleted file mode 100644
index bbb222f..0000000
--- a/LiveQuery/LiveQuery.Test/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LiveQuery/LiveQuery.Unity/LiveQuery.Unity.csproj b/LiveQuery/LiveQuery.Unity/LiveQuery.Unity.csproj
deleted file mode 100644
index 2e35ef5..0000000
--- a/LiveQuery/LiveQuery.Unity/LiveQuery.Unity.csproj
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
- Debug
- AnyCPU
- {3251B4D8-D11A-4D90-8626-27FEE266B066}
- Library
- LiveQuery.Unity
- LiveQuery.Unity
- v4.7
- 0.1.0
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- false
-
-
- true
- bin\Release
- prompt
- 4
- false
-
-
-
-
-
-
-
- Source\AVLiveQuery.cs
-
-
- Source\AVLiveQueryEventArgs.cs
-
-
- Source\AVLiveQueryExtensions.cs
-
-
-
-
- {1E608FCD-9039-4FF7-8EE7-BA8B00E15D1C}
- RTM.Unity
-
-
- {A0D50BCB-E50E-4AAE-8E7D-24BF5AE33DAC}
- Storage.Unity
-
-
-
-
\ No newline at end of file
diff --git a/LiveQuery/LiveQuery.Unity/Properties/AssemblyInfo.cs b/LiveQuery/LiveQuery.Unity/Properties/AssemblyInfo.cs
deleted file mode 100644
index e93ac80..0000000
--- a/LiveQuery/LiveQuery.Unity/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("LiveQuery.Unity")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("${AuthorCopyright}")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
diff --git a/LiveQuery/Source/AVLiveQuery.cs b/LiveQuery/Source/AVLiveQuery.cs
deleted file mode 100644
index b414d4d..0000000
--- a/LiveQuery/Source/AVLiveQuery.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Collections;
-using System.Collections.Generic;
-using LeanCloud.Storage.Internal;
-using LeanCloud.Realtime;
-using LeanCloud.Realtime.Internal;
-using System.Linq;
-using System.Linq.Expressions;
-
-namespace LeanCloud.LiveQuery
-{
- ///
- /// AVLiveQuery 类
- ///
- public static class AVLiveQuery
- {
- ///
- /// LiveQuery 传输数据的 AVRealtime 实例
- ///
- public static AVRealtime Channel {
- get; set;
- }
-
- internal static long ClientTs {
- get; set;
- }
-
- internal static bool Inited {
- get; set;
- }
-
- internal static string InstallationId {
- get; set;
- }
- }
-
- ///
- /// AVLiveQuery 对象
- ///
- ///
- public class AVLiveQuery where T : AVObject
- {
- internal static Dictionary>> liveQueryDict = new Dictionary>>();
-
-
- ///
- /// 当前 AVLiveQuery 对象的 Id
- ///
- public string Id { get; set; }
-
- ///
- /// 根据 AVQuery 创建 AVLiveQuery 对象
- ///
- ///
- public AVLiveQuery(AVQuery query) {
- this.Query = query;
- }
- ///
- /// AVLiveQuery 对应的 AVQuery 对象
- ///
- public AVQuery Query { get; set; }
-
- ///
- /// 数据推送的触发的事件通知
- ///
- public event EventHandler> OnLiveQueryReceived;
-
- ///
- /// 推送抵达时触发事件通知
- ///
- /// 产生这条推送的原因。
- ///
- /// create:符合查询条件的对象创建;
- /// update:符合查询条件的对象属性修改。
- /// enter:对象修改事件,从不符合查询条件变成符合。
- /// leave:对象修改时间,从符合查询条件变成不符合。
- /// delete:对象删除
- /// login:只对 _User 对象有效,表示用户登录。
- ///
- ///
- ///
- public void On(string scope, Action onRecevived)
- {
- this.OnLiveQueryReceived += (sender, e) =>
- {
- if (e.Scope == scope)
- {
- onRecevived.Invoke(e.Payload);
- }
- };
- }
-
- ///
- /// 订阅操作
- ///
- ///
- ///
- public async Task> SubscribeAsync(CancellationToken cancellationToken = default(CancellationToken)) {
- if (Query == null) {
- throw new Exception("Query can not be null when subcribe.");
- }
- if (!AVLiveQuery.Inited) {
- await Login();
- AVLiveQuery.Channel.OnReconnected += OnChannelReconnected;
- AVLiveQuery.Channel.NoticeReceived += OnChannelNoticeReceived;
- AVLiveQuery.Inited = true;
- }
- await InternalSubscribe();
- var liveQueryRef = new WeakReference>(this);
- liveQueryDict.Add(Id, liveQueryRef);
- return this;
- }
-
- static async void OnChannelReconnected(object sender, AVIMReconnectedEventArgs e) {
- await Login();
- lock (liveQueryDict) {
- foreach (var kv in liveQueryDict) {
- if (kv.Value.TryGetTarget(out var liveQuery)) {
- liveQuery.InternalSubscribe().ContinueWith(_ => { });
- }
- }
- }
- }
-
- static async Task Login() {
- var installation = await AVPlugins.Instance.InstallationIdController.GetAsync();
- AVLiveQuery.InstallationId = installation.ToString();
- AVLiveQuery.Channel.ToggleNotification(true);
- await AVLiveQuery.Channel.OpenAsync();
- AVLiveQuery.ClientTs = (long) DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;
- var liveQueryLogInCmd = new AVIMCommand().Command("login")
- .Argument("installationId", AVLiveQuery.InstallationId)
- .Argument("clientTs", AVLiveQuery.ClientTs)
- .Argument("service", 1).AppId(AVClient.CurrentConfiguration.ApplicationId);
- // open the session for LiveQuery.
- try {
- await AVLiveQuery.Channel.AVIMCommandRunner.RunCommandAsync(liveQueryLogInCmd);
- } catch (Exception e) {
- AVRealtime.PrintLog(e.Message);
- }
- }
-
- static void OnChannelNoticeReceived(object sender, AVIMNotice e) {
- if (e.CommandName == "data") {
- var ids = AVDecoder.Instance.DecodeList(e.RawData["ids"]);
- if (e.RawData["msg"] is IEnumerable