From 7592688aae895a82fcf5030a634ce9cac26a800d Mon Sep 17 00:00:00 2001 From: oneRain Date: Mon, 29 Mar 2021 14:56:00 +0800 Subject: [PATCH] chore: adaption --- Common/Common-Unity/Common-Unity.csproj | 43 ----- Common/Common/AppRouter/LCAppRouter.cs | 2 +- Common/Common/Common.csproj | 8 +- Common/Common/Json/LCJsonConverter.cs | 2 +- Common/Common/Json/LCJsonUtils.cs | 2 +- Engine/LCEngine.cs | 2 +- .../LiveQuery-Unity/LiveQuery-Unity.csproj | 32 ---- LiveQuery/LiveQuery.Test/LiveQuery.cs | 2 +- .../Internal/LCLiveQueryConnection.cs | 2 +- Realtime/Realtime-Unity/Realtime-Unity.csproj | 132 --------------- Realtime/Realtime-Unity/link/link.xml | 5 - Realtime/Realtime.Test/Protobuf.cs | 2 +- Realtime/Realtime.Test/Realtime.Test.csproj | 1 - .../Internal/Connection/LCConnection.cs | 2 +- .../Controller/LCIMConversationController.cs | 2 +- .../Controller/LCIMMessageController.cs | 4 +- .../Internal/Protocol/Messages2Proto.cs | 6 +- .../Realtime/Internal/Router/LCRTMRouter.cs | 2 +- .../Realtime/Internal/Router/LCRTMServer.cs | 2 +- Realtime/Realtime/Message/LCIMTypedMessage.cs | 2 +- Realtime/Realtime/Realtime.csproj | 4 +- Storage/Storage-Unity/Storage-Unity.csproj | 160 ------------------ Storage/Storage-Unity/link/link.xml | 4 - Storage/Storage.Test/Storage.Test.csproj | 6 +- Storage/Storage.Test/UserTest.cs | 2 +- Storage/Storage/Internal/Http/LCHttpClient.cs | 2 +- .../Query/LCCompositionalCondition.cs | 2 +- Storage/Storage/LCObject.cs | 2 +- Storage/Storage/LCStatus.cs | 2 +- Storage/Storage/LCStatusQuery.cs | 2 +- Storage/Storage/Storage.csproj | 3 - csharp-sdk.sln | 58 +++---- script/rename-libs.py | 34 ++++ 33 files changed, 90 insertions(+), 446 deletions(-) delete mode 100644 Common/Common-Unity/Common-Unity.csproj delete mode 100644 LiveQuery/LiveQuery-Unity/LiveQuery-Unity.csproj delete mode 100644 Realtime/Realtime-Unity/Realtime-Unity.csproj delete mode 100644 Realtime/Realtime-Unity/link/link.xml delete mode 100644 Storage/Storage-Unity/Storage-Unity.csproj delete mode 100644 Storage/Storage-Unity/link/link.xml create mode 100644 script/rename-libs.py diff --git a/Common/Common-Unity/Common-Unity.csproj b/Common/Common-Unity/Common-Unity.csproj deleted file mode 100644 index ad4acf3..0000000 --- a/Common/Common-Unity/Common-Unity.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - - netstandard2.0 - 0.7.1 - Common - - - - - AppRouter\LCAppServer.cs - - - AppRouter\LCAppRouter.cs - - - Http\LCHttpUtils.cs - - - Json\LCJsonUtils.cs - - - Log\LCLogger.cs - - - Log\LCLogLevel.cs - - - Task\LCTaskExtensions.cs - - - Json\LCJsonConverter.cs - - - Exception\LCException.cs - - - - - ..\..\Unity\Newtonsoft.Json.dll - - - diff --git a/Common/Common/AppRouter/LCAppRouter.cs b/Common/Common/AppRouter/LCAppRouter.cs index d7a0699..abfe09b 100644 --- a/Common/Common/AppRouter/LCAppRouter.cs +++ b/Common/Common/AppRouter/LCAppRouter.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using System.Net.Http; using System.Collections.Generic; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace LeanCloud.Common { public class LCAppRouter { diff --git a/Common/Common/Common.csproj b/Common/Common/Common.csproj index 98698dc..f94e9ae 100644 --- a/Common/Common/Common.csproj +++ b/Common/Common/Common.csproj @@ -6,13 +6,15 @@ Common - - - + + + ProjectReference + + diff --git a/Common/Common/Json/LCJsonConverter.cs b/Common/Common/Json/LCJsonConverter.cs index e9b98fd..cea5e0d 100644 --- a/Common/Common/Json/LCJsonConverter.cs +++ b/Common/Common/Json/LCJsonConverter.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace LeanCloud.Common { public class LCJsonConverter : JsonConverter { diff --git a/Common/Common/Json/LCJsonUtils.cs b/Common/Common/Json/LCJsonUtils.cs index ad368ad..9e13a47 100644 --- a/Common/Common/Json/LCJsonUtils.cs +++ b/Common/Common/Json/LCJsonUtils.cs @@ -1,4 +1,4 @@ -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using System.Threading.Tasks; namespace LeanCloud.Common { diff --git a/Engine/LCEngine.cs b/Engine/LCEngine.cs index 2bf6050..e3a2cce 100644 --- a/Engine/LCEngine.cs +++ b/Engine/LCEngine.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Threading.Tasks; using System.Text.Json; using Microsoft.AspNetCore.Http; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using Microsoft.Extensions.Primitives; using Microsoft.Extensions.DependencyInjection; using LeanCloud.Common; diff --git a/LiveQuery/LiveQuery-Unity/LiveQuery-Unity.csproj b/LiveQuery/LiveQuery-Unity/LiveQuery-Unity.csproj deleted file mode 100644 index 69293ec..0000000 --- a/LiveQuery/LiveQuery-Unity/LiveQuery-Unity.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - netstandard2.0 - true - 0.7.1 - LiveQuery - - - - - - - - Internal\LCLiveQueryHeartBeat.cs - - - Internal\LCLiveQueryConnection.cs - - - LCLiveQuery.cs - - - LCQueryExtension.cs - - - - - ..\..\Unity\Newtonsoft.Json.dll - - - diff --git a/LiveQuery/LiveQuery.Test/LiveQuery.cs b/LiveQuery/LiveQuery.Test/LiveQuery.cs index 9689daf..8a85e2a 100644 --- a/LiveQuery/LiveQuery.Test/LiveQuery.cs +++ b/LiveQuery/LiveQuery.Test/LiveQuery.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using System.Net.Http; using System.Net.Http.Headers; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud; using LeanCloud.Storage; using LeanCloud.LiveQuery; diff --git a/LiveQuery/LiveQuery/Internal/LCLiveQueryConnection.cs b/LiveQuery/LiveQuery/Internal/LCLiveQueryConnection.cs index d11a33e..e2fc7cf 100644 --- a/LiveQuery/LiveQuery/Internal/LCLiveQueryConnection.cs +++ b/LiveQuery/LiveQuery/Internal/LCLiveQueryConnection.cs @@ -2,7 +2,7 @@ using System.Text; using System.Collections.Generic; using System.Threading.Tasks; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Realtime.Internal.Router; using LeanCloud.Realtime.Internal.WebSocket; using LeanCloud.Common; diff --git a/Realtime/Realtime-Unity/Realtime-Unity.csproj b/Realtime/Realtime-Unity/Realtime-Unity.csproj deleted file mode 100644 index 73e897e..0000000 --- a/Realtime/Realtime-Unity/Realtime-Unity.csproj +++ /dev/null @@ -1,132 +0,0 @@ - - - - netstandard2.0 - 0.7.1 - true - Realtime - - - - - Conversation\LCIMConversation.cs - - - Conversation\LCIMServiceConversation.cs - - - Conversation\LCIMConversationMemberInfo.cs - - - Conversation\LCIMConversationQuery.cs - - - Conversation\LCIMChatRoom.cs - - - Conversation\LCIMMessageQueryOptions.cs - - - Conversation\LCIMTemporaryConversation.cs - - - Internal\WebSocket\LCWebSocketClient.cs - - - Internal\Connection\LCHeartBeat.cs - - - Internal\Connection\LCConnection.cs - - - Internal\Protocol\Messages2Proto.cs - - - Internal\Controller\LCIMSessionController.cs - - - Internal\Controller\LCIMController.cs - - - Internal\Controller\LCIMMessageController.cs - - - Internal\Controller\LCIMConversationController.cs - - - Internal\Router\LCRTMServer.cs - - - Internal\Router\LCRTMRouter.cs - - - Message\LCIMVideoMessage.cs - - - Message\LCIMMessageSendOptions.cs - - - Message\LCIMBinaryMessage.cs - - - Message\LCIMFileMessage.cs - - - Message\LCIMRecalledMessage.cs - - - Message\LCIMMessage.cs - - - Message\LCIMTextMessage.cs - - - Message\LCIMImageMessage.cs - - - Message\LCIMAudioMessage.cs - - - Message\LCIMLocationMessage.cs - - - Message\LCIMTypedMessage.cs - - - Result\LCIMOperationFailure.cs - - - Result\LCIMPageResult.cs - - - Result\LCIMPartiallySuccessResult.cs - - - Signature\LCIMSignature.cs - - - Signature\ILCIMSignatureFactory.cs - - - Signature\LCIMSignatureAction.cs - - - LCIMClient.cs - - - LCRealtime.cs - - - - - - - - - ..\..\Unity\Newtonsoft.Json.dll - - - - - - diff --git a/Realtime/Realtime-Unity/link/link.xml b/Realtime/Realtime-Unity/link/link.xml deleted file mode 100644 index 2c4d0b3..0000000 --- a/Realtime/Realtime-Unity/link/link.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Realtime/Realtime.Test/Protobuf.cs b/Realtime/Realtime.Test/Protobuf.cs index fdb8d33..b199f42 100644 --- a/Realtime/Realtime.Test/Protobuf.cs +++ b/Realtime/Realtime.Test/Protobuf.cs @@ -1,6 +1,6 @@ using NUnit.Framework; using LeanCloud.Realtime.Internal.Protocol; -using Google.Protobuf; +using LC.Google.Protobuf; namespace Realtime.Test { public class Protobuf { diff --git a/Realtime/Realtime.Test/Realtime.Test.csproj b/Realtime/Realtime.Test/Realtime.Test.csproj index 4b63fee..ff5f8a6 100644 --- a/Realtime/Realtime.Test/Realtime.Test.csproj +++ b/Realtime/Realtime.Test/Realtime.Test.csproj @@ -15,6 +15,5 @@ - diff --git a/Realtime/Realtime/Internal/Connection/LCConnection.cs b/Realtime/Realtime/Internal/Connection/LCConnection.cs index 5716a74..e724b26 100644 --- a/Realtime/Realtime/Internal/Connection/LCConnection.cs +++ b/Realtime/Realtime/Internal/Connection/LCConnection.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Text; using System.Collections.Generic; using System.Threading.Tasks; -using Google.Protobuf; +using LC.Google.Protobuf; using LeanCloud.Realtime.Internal.Router; using LeanCloud.Realtime.Internal.WebSocket; using LeanCloud.Realtime.Internal.Protocol; diff --git a/Realtime/Realtime/Internal/Controller/LCIMConversationController.cs b/Realtime/Realtime/Internal/Controller/LCIMConversationController.cs index a343635..4264adf 100644 --- a/Realtime/Realtime/Internal/Controller/LCIMConversationController.cs +++ b/Realtime/Realtime/Internal/Controller/LCIMConversationController.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Threading.Tasks; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Realtime.Internal.Protocol; using LeanCloud.Storage.Internal.Codec; using LeanCloud.Common; diff --git a/Realtime/Realtime/Internal/Controller/LCIMMessageController.cs b/Realtime/Realtime/Internal/Controller/LCIMMessageController.cs index fcddb60..f9a3f2a 100644 --- a/Realtime/Realtime/Internal/Controller/LCIMMessageController.cs +++ b/Realtime/Realtime/Internal/Controller/LCIMMessageController.cs @@ -2,8 +2,8 @@ using System.Linq; using System.Threading.Tasks; using System.Collections.ObjectModel; -using Newtonsoft.Json; -using Google.Protobuf; +using LC.Newtonsoft.Json; +using LC.Google.Protobuf; using LeanCloud.Realtime.Internal.Protocol; namespace LeanCloud.Realtime.Internal.Controller { diff --git a/Realtime/Realtime/Internal/Protocol/Messages2Proto.cs b/Realtime/Realtime/Internal/Protocol/Messages2Proto.cs index 030e37f..67fffdb 100644 --- a/Realtime/Realtime/Internal/Protocol/Messages2Proto.cs +++ b/Realtime/Realtime/Internal/Protocol/Messages2Proto.cs @@ -5,9 +5,9 @@ #pragma warning disable 1591, 0612, 3021 #region Designer generated code -using pb = global::Google.Protobuf; -using pbc = global::Google.Protobuf.Collections; -using pbr = global::Google.Protobuf.Reflection; +using pb = global::LC.Google.Protobuf; +using pbc = global::LC.Google.Protobuf.Collections; +using pbr = global::LC.Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace LeanCloud.Realtime.Internal.Protocol { diff --git a/Realtime/Realtime/Internal/Router/LCRTMRouter.cs b/Realtime/Realtime/Internal/Router/LCRTMRouter.cs index b818823..913c8c6 100644 --- a/Realtime/Realtime/Internal/Router/LCRTMRouter.cs +++ b/Realtime/Realtime/Internal/Router/LCRTMRouter.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using System.Net.Http; using LeanCloud.Common; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace LeanCloud.Realtime.Internal.Router { diff --git a/Realtime/Realtime/Internal/Router/LCRTMServer.cs b/Realtime/Realtime/Internal/Router/LCRTMServer.cs index 0e6ad07..a793a40 100644 --- a/Realtime/Realtime/Internal/Router/LCRTMServer.cs +++ b/Realtime/Realtime/Internal/Router/LCRTMServer.cs @@ -1,5 +1,5 @@ using System; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace LeanCloud.Realtime.Internal.Router { public class LCRTMServer { diff --git a/Realtime/Realtime/Message/LCIMTypedMessage.cs b/Realtime/Realtime/Message/LCIMTypedMessage.cs index 95ccb59..df2709e 100644 --- a/Realtime/Realtime/Message/LCIMTypedMessage.cs +++ b/Realtime/Realtime/Message/LCIMTypedMessage.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Storage.Internal.Codec; using LeanCloud.Common; diff --git a/Realtime/Realtime/Realtime.csproj b/Realtime/Realtime/Realtime.csproj index 9abdcae..400a961 100644 --- a/Realtime/Realtime/Realtime.csproj +++ b/Realtime/Realtime/Realtime.csproj @@ -7,9 +7,6 @@ true - - - @@ -25,5 +22,6 @@ + diff --git a/Storage/Storage-Unity/Storage-Unity.csproj b/Storage/Storage-Unity/Storage-Unity.csproj deleted file mode 100644 index 61dfee8..0000000 --- a/Storage/Storage-Unity/Storage-Unity.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - netstandard2.0 - 0.7.1 - Storage - - - - - LCACL.cs - - - LCApplication.cs - - - LCCloud.cs - - - LCFile.cs - - - LCGeoPoint.cs - - - LCObject.cs - - - LCQuery.cs - - - LCRelation.cs - - - LCRole.cs - - - LCUser.cs - - - LCUserAuthDataLoginOption.cs - - - Internal\Operation\LCNumberOperation.cs - - - Internal\Operation\LCAddRelationOperation.cs - - - Internal\Operation\LCDeleteOperation.cs - - - Internal\Operation\LCSetOperation.cs - - - Internal\Operation\LCAddUniqueOperation.cs - - - Internal\Operation\LCRemoveOperation.cs - - - Internal\Operation\LCRemoveRelationOperation.cs - - - Internal\Operation\LCAddOperation.cs - - - Internal\Operation\ILCOperation.cs - - - Internal\File\LCProgressableStreamContent.cs - - - Internal\File\LCQiniuUploader.cs - - - Internal\File\LCMimeTypeMap.cs - - - Internal\File\LCAWSUploader.cs - - - Internal\Codec\LCEncoder.cs - - - Internal\Codec\LCDecoder.cs - - - Internal\Object\LCSubClassInfo.cs - - - Internal\Object\LCBatch.cs - - - Internal\Object\LCObjectData.cs - - - Internal\Http\LCHttpClient.cs - - - Internal\Query\LCEqualCondition.cs - - - Internal\Query\LCOperationCondition.cs - - - Internal\Query\LCRelatedCondition.cs - - - Internal\Query\ILCQueryCondition.cs - - - Internal\Query\LCCompositionalCondition.cs - - - LCCaptchaClient.cs - - - LCSMSClient.cs - - - Leaderboard\LCLeaderboardArchive.cs - - - Leaderboard\LCStatistic.cs - - - Leaderboard\LCLeaderboard.cs - - - Leaderboard\LCRanking.cs - - - LCFollowersAndFollowees.cs - - - LCFriendship.cs - - - LCFriendshipRequest.cs - - - LCStatus.cs - - - LCStatusCount.cs - - - LCStatusQuery.cs - - - - - - - - ..\..\Unity\Newtonsoft.Json.dll - - - diff --git a/Storage/Storage-Unity/link/link.xml b/Storage/Storage-Unity/link/link.xml deleted file mode 100644 index 5b423ac..0000000 --- a/Storage/Storage-Unity/link/link.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Storage/Storage.Test/Storage.Test.csproj b/Storage/Storage.Test/Storage.Test.csproj index 3dc1f8e..a3203b4 100644 --- a/Storage/Storage.Test/Storage.Test.csproj +++ b/Storage/Storage.Test/Storage.Test.csproj @@ -7,11 +7,13 @@ 0.7.1 + + 4 + - - + diff --git a/Storage/Storage.Test/UserTest.cs b/Storage/Storage.Test/UserTest.cs index 99f320a..6f8bb53 100644 --- a/Storage/Storage.Test/UserTest.cs +++ b/Storage/Storage.Test/UserTest.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using LeanCloud; using LeanCloud.Storage; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace Storage.Test { public class UserTest { diff --git a/Storage/Storage/Internal/Http/LCHttpClient.cs b/Storage/Storage/Internal/Http/LCHttpClient.cs index f1f9734..4fd4a2e 100644 --- a/Storage/Storage/Internal/Http/LCHttpClient.cs +++ b/Storage/Storage/Internal/Http/LCHttpClient.cs @@ -7,7 +7,7 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Text; using System.Security.Cryptography; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Common; namespace LeanCloud.Storage.Internal.Http { diff --git a/Storage/Storage/Internal/Query/LCCompositionalCondition.cs b/Storage/Storage/Internal/Query/LCCompositionalCondition.cs index 3a0ac27..cfae0ae 100644 --- a/Storage/Storage/Internal/Query/LCCompositionalCondition.cs +++ b/Storage/Storage/Internal/Query/LCCompositionalCondition.cs @@ -1,6 +1,6 @@ using System.Collections; using System.Collections.Generic; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage.Internal.Query { diff --git a/Storage/Storage/LCObject.cs b/Storage/Storage/LCObject.cs index 422aa4b..d50523a 100644 --- a/Storage/Storage/LCObject.cs +++ b/Storage/Storage/LCObject.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Storage.Internal.Object; using LeanCloud.Storage.Internal.Operation; using LeanCloud.Storage.Internal.Codec; diff --git a/Storage/Storage/LCStatus.cs b/Storage/Storage/LCStatus.cs index 97030dc..fa2f103 100644 --- a/Storage/Storage/LCStatus.cs +++ b/Storage/Storage/LCStatus.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using System.Collections.Generic; using LeanCloud.Storage.Internal.Codec; using LeanCloud.Storage.Internal.Object; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; namespace LeanCloud.Storage { public class LCStatus : LCObject { diff --git a/Storage/Storage/LCStatusQuery.cs b/Storage/Storage/LCStatusQuery.cs index 7688295..f43a871 100644 --- a/Storage/Storage/LCStatusQuery.cs +++ b/Storage/Storage/LCStatusQuery.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; using System.Collections; using System.Collections.ObjectModel; using System.Collections.Generic; -using Newtonsoft.Json; +using LC.Newtonsoft.Json; using LeanCloud.Storage.Internal.Codec; using LeanCloud.Storage.Internal.Object; diff --git a/Storage/Storage/Storage.csproj b/Storage/Storage/Storage.csproj index 55b32c5..2abf9e8 100644 --- a/Storage/Storage/Storage.csproj +++ b/Storage/Storage/Storage.csproj @@ -10,9 +10,6 @@ - - - diff --git a/csharp-sdk.sln b/csharp-sdk.sln index 50b862a..3ff4f70 100644 --- a/csharp-sdk.sln +++ b/csharp-sdk.sln @@ -7,20 +7,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{375B85 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Realtime", "Realtime", "{319A9989-3B69-4AD0-9E43-F6D31C1D2A4A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Realtime-Unity", "Realtime\Realtime-Unity\Realtime-Unity.csproj", "{26CDAE2A-6D79-4981-8D80-3EA34FDFB134}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{2D980281-F060-4363-AB7A-D4B6C30ADDBB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Storage.Test", "Storage\Storage.Test\Storage.Test.csproj", "{8788FAA9-BF14-4CCE-BF5A-9007DB50860C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Storage", "Storage\Storage\Storage.csproj", "{4194FE34-327C-42C2-971F-6B07904E20A5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Storage-Unity", "Storage\Storage-Unity\Storage-Unity.csproj", "{8022D2AC-EA87-43DF-AC47-8FF5ED60AD24}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common\Common.csproj", "{4FF29D41-36AA-4D1A-BE4E-196A697B788D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common-Unity", "Common\Common-Unity\Common-Unity.csproj", "{19B6BC25-1EF1-4D02-99ED-954AC6B84C12}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Realtime.Test", "Realtime\Realtime.Test\Realtime.Test.csproj", "{882A9419-CC5E-4CFB-B076-7561989B0A4A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Realtime", "Realtime\Realtime\Realtime.csproj", "{75A3A4EC-93B8-40C9-AE04-DF14A72525CC}" @@ -33,44 +25,34 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQuery", "LiveQuery\Live EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQuery.Test", "LiveQuery\LiveQuery.Test\LiveQuery.Test.csproj", "{0F61B6D7-4948-4D98-B6CC-41CF33B55669}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQuery-Unity", "LiveQuery\LiveQuery-Unity\LiveQuery-Unity.csproj", "{12482E48-C0CF-46B1-8FDD-5885D1B7DC4D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQueryApp", "Sample\LiveQueryApp\LiveQueryApp.csproj", "{9D5E6A37-8925-48ED-B7EA-12C89291B59D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{8087ABCD-629C-4EE5-9ECE-8BDAE631236F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine", "Engine\Engine.csproj", "{0A6AEBC9-9A36-4EA7-8F58-8B951126092D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{3B53EFFB-6962-4EED-88FD-F9D6E9650A2D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LC.Google.Protobuf", "Libs\Google.Protobuf\LC.Google.Protobuf.csproj", "{FA0E2CEC-4623-4119-92D9-12F2A4699F41}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LC.Newtonsoft.Json", "Libs\Newtonsoft.Json\LC.Newtonsoft.Json.csproj", "{AE39723C-03C3-423F-9086-9AA36B3587D1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Storage.Test", "Storage\Storage.Test\Storage.Test.csproj", "{07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {26CDAE2A-6D79-4981-8D80-3EA34FDFB134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {26CDAE2A-6D79-4981-8D80-3EA34FDFB134}.Debug|Any CPU.Build.0 = Debug|Any CPU - {26CDAE2A-6D79-4981-8D80-3EA34FDFB134}.Release|Any CPU.ActiveCfg = Release|Any CPU - {26CDAE2A-6D79-4981-8D80-3EA34FDFB134}.Release|Any CPU.Build.0 = Release|Any CPU - {8788FAA9-BF14-4CCE-BF5A-9007DB50860C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8788FAA9-BF14-4CCE-BF5A-9007DB50860C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8788FAA9-BF14-4CCE-BF5A-9007DB50860C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8788FAA9-BF14-4CCE-BF5A-9007DB50860C}.Release|Any CPU.Build.0 = Release|Any CPU {4194FE34-327C-42C2-971F-6B07904E20A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4194FE34-327C-42C2-971F-6B07904E20A5}.Debug|Any CPU.Build.0 = Debug|Any CPU {4194FE34-327C-42C2-971F-6B07904E20A5}.Release|Any CPU.ActiveCfg = Release|Any CPU {4194FE34-327C-42C2-971F-6B07904E20A5}.Release|Any CPU.Build.0 = Release|Any CPU - {8022D2AC-EA87-43DF-AC47-8FF5ED60AD24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8022D2AC-EA87-43DF-AC47-8FF5ED60AD24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8022D2AC-EA87-43DF-AC47-8FF5ED60AD24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8022D2AC-EA87-43DF-AC47-8FF5ED60AD24}.Release|Any CPU.Build.0 = Release|Any CPU {4FF29D41-36AA-4D1A-BE4E-196A697B788D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4FF29D41-36AA-4D1A-BE4E-196A697B788D}.Debug|Any CPU.Build.0 = Debug|Any CPU {4FF29D41-36AA-4D1A-BE4E-196A697B788D}.Release|Any CPU.ActiveCfg = Release|Any CPU {4FF29D41-36AA-4D1A-BE4E-196A697B788D}.Release|Any CPU.Build.0 = Release|Any CPU - {19B6BC25-1EF1-4D02-99ED-954AC6B84C12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19B6BC25-1EF1-4D02-99ED-954AC6B84C12}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19B6BC25-1EF1-4D02-99ED-954AC6B84C12}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19B6BC25-1EF1-4D02-99ED-954AC6B84C12}.Release|Any CPU.Build.0 = Release|Any CPU {882A9419-CC5E-4CFB-B076-7561989B0A4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {882A9419-CC5E-4CFB-B076-7561989B0A4A}.Debug|Any CPU.Build.0 = Debug|Any CPU {882A9419-CC5E-4CFB-B076-7561989B0A4A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -91,10 +73,6 @@ Global {0F61B6D7-4948-4D98-B6CC-41CF33B55669}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F61B6D7-4948-4D98-B6CC-41CF33B55669}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F61B6D7-4948-4D98-B6CC-41CF33B55669}.Release|Any CPU.Build.0 = Release|Any CPU - {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D}.Release|Any CPU.Build.0 = Release|Any CPU {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -103,22 +81,32 @@ Global {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Debug|Any CPU.Build.0 = Debug|Any CPU {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Release|Any CPU.Build.0 = Release|Any CPU + {FA0E2CEC-4623-4119-92D9-12F2A4699F41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA0E2CEC-4623-4119-92D9-12F2A4699F41}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA0E2CEC-4623-4119-92D9-12F2A4699F41}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA0E2CEC-4623-4119-92D9-12F2A4699F41}.Release|Any CPU.Build.0 = Release|Any CPU + {AE39723C-03C3-423F-9086-9AA36B3587D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE39723C-03C3-423F-9086-9AA36B3587D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE39723C-03C3-423F-9086-9AA36B3587D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE39723C-03C3-423F-9086-9AA36B3587D1}.Release|Any CPU.Build.0 = Release|Any CPU + {07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70}.Debug|Any CPU.Build.0 = Debug|Any CPU + {07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70}.Release|Any CPU.ActiveCfg = Release|Any CPU + {07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution - {26CDAE2A-6D79-4981-8D80-3EA34FDFB134} = {319A9989-3B69-4AD0-9E43-F6D31C1D2A4A} - {8788FAA9-BF14-4CCE-BF5A-9007DB50860C} = {076871D0-BE1F-4AF0-B83E-697C71C0C3B3} {4194FE34-327C-42C2-971F-6B07904E20A5} = {076871D0-BE1F-4AF0-B83E-697C71C0C3B3} - {8022D2AC-EA87-43DF-AC47-8FF5ED60AD24} = {076871D0-BE1F-4AF0-B83E-697C71C0C3B3} {4FF29D41-36AA-4D1A-BE4E-196A697B788D} = {375B854F-C239-4503-868A-7F04C40582E5} - {19B6BC25-1EF1-4D02-99ED-954AC6B84C12} = {375B854F-C239-4503-868A-7F04C40582E5} {882A9419-CC5E-4CFB-B076-7561989B0A4A} = {319A9989-3B69-4AD0-9E43-F6D31C1D2A4A} {75A3A4EC-93B8-40C9-AE04-DF14A72525CC} = {319A9989-3B69-4AD0-9E43-F6D31C1D2A4A} {A716EFC7-9220-4A9A-9F73-B816A0787F77} = {2D980281-F060-4363-AB7A-D4B6C30ADDBB} {02D23AC7-FBF7-49ED-994F-C1D0D3C3ABFE} = {A1A24E0F-6901-4A9A-9BB8-4F586BC7EE17} {0F61B6D7-4948-4D98-B6CC-41CF33B55669} = {A1A24E0F-6901-4A9A-9BB8-4F586BC7EE17} - {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D} = {A1A24E0F-6901-4A9A-9BB8-4F586BC7EE17} {9D5E6A37-8925-48ED-B7EA-12C89291B59D} = {2D980281-F060-4363-AB7A-D4B6C30ADDBB} {0A6AEBC9-9A36-4EA7-8F58-8B951126092D} = {8087ABCD-629C-4EE5-9ECE-8BDAE631236F} + {FA0E2CEC-4623-4119-92D9-12F2A4699F41} = {3B53EFFB-6962-4EED-88FD-F9D6E9650A2D} + {AE39723C-03C3-423F-9086-9AA36B3587D1} = {3B53EFFB-6962-4EED-88FD-F9D6E9650A2D} + {07B8BAE6-CA9A-48B0-9881-F63F1F5DCE70} = {076871D0-BE1F-4AF0-B83E-697C71C0C3B3} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution version = 0.7.1 diff --git a/script/rename-libs.py b/script/rename-libs.py new file mode 100644 index 0000000..866aa58 --- /dev/null +++ b/script/rename-libs.py @@ -0,0 +1,34 @@ +# coding=utf8 +import os +import re + +NAMESPACE_PREFIX = 'LC' + +LIB_NAMES = [ + 'Newtonsoft', + 'Google' +] + +SDK_ROOT = '../' + +REPLACES = {} + +for name in LIB_NAMES: + REPLACES['namespace %s' % name] = 'namespace %s.%s' % (NAMESPACE_PREFIX, name) + REPLACES['using %s' % name] = 'using %s.%s' % (NAMESPACE_PREFIX, name) + REPLACES['global::%s' % name] = 'global::%s.%s' % (NAMESPACE_PREFIX, name) + REPLACES['using static %s' % name] = 'using static %s.%s' % (NAMESPACE_PREFIX, name) + REPLACES[' = %s' % name] = ' = %s.%s' % (NAMESPACE_PREFIX, name) + +for path, dirs, files in os.walk(SDK_ROOT): + files = [f for f in files if f.endswith('.cs')] + for file in files: + filepath = os.path.join(path, file) + print(filepath) + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + for (k, v) in REPLACES.items(): + regex = r'\b%s\b' % k + content = re.sub(regex, v, content) + with open(filepath, 'w') as f: + f.write(content)