From be08db1fafdfce1211f4328985a6885c148a70f5 Mon Sep 17 00:00:00 2001 From: Blank Date: Wed, 15 Jan 2025 14:48:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]1.=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E9=9B=86=E7=9A=84=E5=BC=95=E7=94=A8=E3=80=82?= =?UTF-8?q?=E4=BB=8E=E6=94=B9=E7=89=88=E6=9C=AC=E5=BC=80=E5=A7=8B=E4=B8=BA?= =?UTF-8?q?=E6=89=8B=E5=8A=A8=E5=8D=87=E7=BA=A7=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Account/Login/Entity/LoginState.cs | 2 + GameFrameX.Apps/ActorType.cs | 2 +- GameFrameX.Apps/BsonClassMapHelper.cs | 153 +++++++++--------- GameFrameX.Apps/CacheStateTypeManager.cs | 4 +- .../Common/Event/EventAttribute.cs | 19 ++- GameFrameX.Apps/Common/Event/EventId.cs | 103 ++++++------ GameFrameX.Apps/Common/Session/Session.cs | 1 - .../Common/Session/SessionManager.cs | 2 +- GameFrameX.Apps/GameFrameX.Apps.csproj | 4 +- GameFrameX.Apps/GlobalUsings.cs | 5 - .../Player/Component/PlayerComponent.cs | 5 +- .../Player/Player/Entity/PlayerState.cs | 7 +- .../Player/Role/Bag/Component/BagComponent.cs | 4 +- .../Player/Role/Bag/Entity/BagState.cs | 4 +- .../Player/Role/Pet/Component/PetComponent.cs | 5 +- .../Player/Role/Pet/Entity/PetState.cs | 2 + .../Server/Component/ServerComponent.cs | 5 +- .../Server/Server/Entity/ServerState.cs | 2 + .../Agent/AgentGenerator.cs | 2 +- .../GameFrameX.CodeGenerator.csproj | 3 +- GameFrameX.Config/ConfigComponent.cs | 2 +- GameFrameX.Config/GameFrameX.Config.csproj | 4 +- .../Events/EventDispatcherExtensions.cs | 2 + GameFrameX.Hotfix/GameFrameX.Hotfix.csproj | 3 +- GameFrameX.Hotfix/GlobalUsings.cs | 6 +- .../GameFrameX.Launcher.csproj | 7 +- GameFrameX.Launcher/GlobalUsings.cs | 6 +- .../StartUp/AppStartUpService.cs | 12 +- .../StartUp/Game/AppStartUpGame.cs | 1 + GameFrameX.Proto/BuiltIn/DiscoveryCenter.cs | 2 +- GameFrameX.Proto/GameFrameX.Proto.csproj | 2 +- 31 files changed, 187 insertions(+), 194 deletions(-) diff --git a/GameFrameX.Apps/Account/Login/Entity/LoginState.cs b/GameFrameX.Apps/Account/Login/Entity/LoginState.cs index 978f5561..2ec43ca1 100644 --- a/GameFrameX.Apps/Account/Login/Entity/LoginState.cs +++ b/GameFrameX.Apps/Account/Login/Entity/LoginState.cs @@ -1,3 +1,5 @@ +using GameFrameX.DataBase.Mongo; + namespace GameFrameX.Apps.Account.Login.Entity; public class LoginState : CacheState diff --git a/GameFrameX.Apps/ActorType.cs b/GameFrameX.Apps/ActorType.cs index d89c45a2..2c6514bc 100644 --- a/GameFrameX.Apps/ActorType.cs +++ b/GameFrameX.Apps/ActorType.cs @@ -1,4 +1,4 @@ -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps; diff --git a/GameFrameX.Apps/BsonClassMapHelper.cs b/GameFrameX.Apps/BsonClassMapHelper.cs index 95205356..75e92b9e 100644 --- a/GameFrameX.Apps/BsonClassMapHelper.cs +++ b/GameFrameX.Apps/BsonClassMapHelper.cs @@ -1,114 +1,113 @@ -using GameFrameX.Log; +using GameFrameX.Utility.Log; -namespace GameFrameX.Apps +namespace GameFrameX.Apps; + +public class DictionaryRepresentationConvention : ConventionBase, IMemberMapConvention { - public class DictionaryRepresentationConvention : ConventionBase, IMemberMapConvention - { - private readonly DictionaryRepresentation _dictionaryRepresentation; + private readonly DictionaryRepresentation _dictionaryRepresentation; - public DictionaryRepresentationConvention(DictionaryRepresentation dictionaryRepresentation = DictionaryRepresentation.ArrayOfDocuments) - { - _dictionaryRepresentation = dictionaryRepresentation; - } + public DictionaryRepresentationConvention(DictionaryRepresentation dictionaryRepresentation = DictionaryRepresentation.ArrayOfDocuments) + { + _dictionaryRepresentation = dictionaryRepresentation; + } - public void Apply(BsonMemberMap memberMap) + public void Apply(BsonMemberMap memberMap) + { + var serializer = memberMap.GetSerializer(); + if (serializer is IDictionaryRepresentationConfigurable dictionaryRepresentationConfigurable) { - var serializer = memberMap.GetSerializer(); - if (serializer is IDictionaryRepresentationConfigurable dictionaryRepresentationConfigurable) - { - var reconfiguredSerializer = dictionaryRepresentationConfigurable.WithDictionaryRepresentation(_dictionaryRepresentation); - memberMap.SetSerializer(reconfiguredSerializer); - } + var reconfiguredSerializer = dictionaryRepresentationConfigurable.WithDictionaryRepresentation(_dictionaryRepresentation); + memberMap.SetSerializer(reconfiguredSerializer); } } +} - public class EmptyContainerSerializeMethodConvention : ConventionBase, IMemberMapConvention +public class EmptyContainerSerializeMethodConvention : ConventionBase, IMemberMapConvention +{ + public void Apply(BsonMemberMap memberMap) { - public void Apply(BsonMemberMap memberMap) + if (memberMap.MemberType.IsGenericType) { - if (memberMap.MemberType.IsGenericType) + var genType = memberMap.MemberType.GetGenericTypeDefinition(); + if (genType == typeof(List<>)) { - var genType = memberMap.MemberType.GetGenericTypeDefinition(); - if (genType == typeof(List<>)) + memberMap.SetShouldSerializeMethod(o => { - memberMap.SetShouldSerializeMethod(o => + var value = memberMap.Getter(o); + if (value is IList list) { - var value = memberMap.Getter(o); - if (value is IList list) - { - return list != null && list.Count > 0; - } + return list != null && list.Count > 0; + } - return true; - }); - } + return true; + }); + } - else if (genType == typeof(ConcurrentDictionary<,>) || genType == typeof(Dictionary<,>)) + else if (genType == typeof(ConcurrentDictionary<,>) || genType == typeof(Dictionary<,>)) + { + memberMap.SetShouldSerializeMethod(o => { - memberMap.SetShouldSerializeMethod(o => + if (o != null) { - if (o != null) + var value = memberMap.Getter(o); + if (value != null) { - var value = memberMap.Getter(o); - if (value != null) + var countProperty = value.GetType().GetProperty("Count"); + if (countProperty != null) { - PropertyInfo countProperty = value.GetType().GetProperty("Count"); - if (countProperty != null) - { - int count = (int)countProperty.GetValue(value, null); - return count > 0; - } + var count = (int)countProperty.GetValue(value, null); + return count > 0; } } + } - return true; - }); - } + return true; + }); } } } +} - public static class BsonClassMapHelper +public static class BsonClassMapHelper +{ + public static void SetConvention() { - public static void SetConvention() - { - ConventionRegistry.Register(nameof(DictionaryRepresentationConvention), - new ConventionPack { new DictionaryRepresentationConvention(DictionaryRepresentation.ArrayOfDocuments) }, _ => true); + ConventionRegistry.Register(nameof(DictionaryRepresentationConvention), + new ConventionPack { new DictionaryRepresentationConvention(), }, _ => true); - ConventionRegistry.Register(nameof(EmptyContainerSerializeMethodConvention), - new ConventionPack { new EmptyContainerSerializeMethodConvention() }, _ => true); - } + ConventionRegistry.Register(nameof(EmptyContainerSerializeMethodConvention), + new ConventionPack { new EmptyContainerSerializeMethodConvention(), }, _ => true); + } - /// - /// 提前注册,简化多态类型处理 - /// - /// - public static void RegisterAllClass(System.Reflection.Assembly assembly) + /// + /// 提前注册,简化多态类型处理 + /// + /// + public static void RegisterAllClass(Assembly assembly) + { + var types = assembly.GetTypes(); + foreach (var t in types) { - var types = assembly.GetTypes(); - foreach (var t in types) + try { - try + if (!BsonClassMap.IsClassMapRegistered(t)) { - if (!BsonClassMap.IsClassMapRegistered(t)) - { - RegisterClass(t); - } - } - catch (Exception e) - { - LogHelper.Error(e); + RegisterClass(t); } } + catch (Exception e) + { + LogHelper.Error(e); + } } + } - public static void RegisterClass(Type t) - { - var bsonClassMap = new BsonClassMap(t); - bsonClassMap.AutoMap(); - bsonClassMap.SetIgnoreExtraElements(true); - bsonClassMap.SetIgnoreExtraElementsIsInherited(true); - BsonClassMap.RegisterClassMap(bsonClassMap); - } + public static void RegisterClass(Type t) + { + var bsonClassMap = new BsonClassMap(t); + bsonClassMap.AutoMap(); + bsonClassMap.SetIgnoreExtraElements(true); + bsonClassMap.SetIgnoreExtraElementsIsInherited(true); + BsonClassMap.RegisterClassMap(bsonClassMap); } -} +} \ No newline at end of file diff --git a/GameFrameX.Apps/CacheStateTypeManager.cs b/GameFrameX.Apps/CacheStateTypeManager.cs index 4608b10a..4cc2f64d 100644 --- a/GameFrameX.Apps/CacheStateTypeManager.cs +++ b/GameFrameX.Apps/CacheStateTypeManager.cs @@ -1,6 +1,4 @@ - - -using GameFrameX.DataBase.Abstractions; +using GameFrameX.Utility.Extensions; namespace GameFrameX.Apps; diff --git a/GameFrameX.Apps/Common/Event/EventAttribute.cs b/GameFrameX.Apps/Common/Event/EventAttribute.cs index 397482ac..bf749e53 100644 --- a/GameFrameX.Apps/Common/Event/EventAttribute.cs +++ b/GameFrameX.Apps/Common/Event/EventAttribute.cs @@ -1,18 +1,17 @@ using GameFrameX.Core.Abstractions.Events; -namespace GameFrameX.Apps.Common.Event +namespace GameFrameX.Apps.Common.Event; + +/// +/// 表示事件的特性。 +/// +public sealed class EventAttribute : EventInfoAttribute { /// - /// 表示事件的特性。 + /// 使用指定的事件ID初始化 类的新实例。 /// - public sealed class EventAttribute : EventInfoAttribute + /// 事件ID。 + public EventAttribute(EventId eventId) : base((int)eventId) { - /// - /// 使用指定的事件ID初始化 类的新实例。 - /// - /// 事件ID。 - public EventAttribute(EventId eventId) : base((int)eventId) - { - } } } \ No newline at end of file diff --git a/GameFrameX.Apps/Common/Event/EventId.cs b/GameFrameX.Apps/Common/Event/EventId.cs index 9cc4943b..6bbe5072 100644 --- a/GameFrameX.Apps/Common/Event/EventId.cs +++ b/GameFrameX.Apps/Common/Event/EventId.cs @@ -1,54 +1,53 @@ -namespace GameFrameX.Apps.Common.Event +namespace GameFrameX.Apps.Common.Event; + +public enum EventId { - public enum EventId - { - #region role event - - /// - /// 玩家事件 - /// - SessionRemove = 1000, - - /// - /// 玩家等级提升 - /// - RoleLevelUp = 1001, - - /// - /// 玩家vip改变 - /// - RoleVipChange, - - /// - /// 玩家上线 - /// - OnRoleOnline, - - /// - /// 玩家下线 - /// - OnRoleOffline, - - /// - /// 解锁用 - /// - GotNewPet, - - #endregion - - /// - /// 玩家事件分割点 - /// - RoleSeparator = 8000, - - #region server event - - //服务器事件 - /// - /// 世界等级改变 - /// - WorldLevelChange, - - #endregion - } + #region role event + + /// + /// 玩家事件 + /// + SessionRemove = 1000, + + /// + /// 玩家等级提升 + /// + RoleLevelUp = 1001, + + /// + /// 玩家vip改变 + /// + RoleVipChange, + + /// + /// 玩家上线 + /// + OnRoleOnline, + + /// + /// 玩家下线 + /// + OnRoleOffline, + + /// + /// 解锁用 + /// + GotNewPet, + + #endregion + + /// + /// 玩家事件分割点 + /// + RoleSeparator = 8000, + + #region server event + + //服务器事件 + /// + /// 世界等级改变 + /// + WorldLevelChange, + + #endregion } \ No newline at end of file diff --git a/GameFrameX.Apps/Common/Session/Session.cs b/GameFrameX.Apps/Common/Session/Session.cs index 55367209..2800efd0 100644 --- a/GameFrameX.Apps/Common/Session/Session.cs +++ b/GameFrameX.Apps/Common/Session/Session.cs @@ -1,6 +1,5 @@ using GameFrameX.NetWork.Abstractions; using GameFrameX.NetWork.Messages; -using GameFrameX.Setting; namespace GameFrameX.Apps.Common.Session; diff --git a/GameFrameX.Apps/Common/Session/SessionManager.cs b/GameFrameX.Apps/Common/Session/SessionManager.cs index ef294d3c..020f9ef5 100644 --- a/GameFrameX.Apps/Common/Session/SessionManager.cs +++ b/GameFrameX.Apps/Common/Session/SessionManager.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using GameFrameX.Apps.Common.Event; using GameFrameX.NetWork.Abstractions; -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps.Common.Session; diff --git a/GameFrameX.Apps/GameFrameX.Apps.csproj b/GameFrameX.Apps/GameFrameX.Apps.csproj index abf9e90d..a65c0827 100644 --- a/GameFrameX.Apps/GameFrameX.Apps.csproj +++ b/GameFrameX.Apps/GameFrameX.Apps.csproj @@ -17,7 +17,7 @@ - - + + diff --git a/GameFrameX.Apps/GlobalUsings.cs b/GameFrameX.Apps/GlobalUsings.cs index fccc4759..2ae2978f 100644 --- a/GameFrameX.Apps/GlobalUsings.cs +++ b/GameFrameX.Apps/GlobalUsings.cs @@ -5,19 +5,14 @@ global using MongoDB.Bson.Serialization.Attributes; global using GameFrameX.Core; global using GameFrameX.Core.Utility; -global using GameFrameX.Core.Components; global using GameFrameX.Core.Events; global using GameFrameX.Core.Hotfix.Agent; global using GameFrameX.Core.Hotfix; global using GameFrameX.Core.Actors; global using GameFrameX.Core.Timer; -global using GameFrameX.Core.Abstractions.Attribute; global using GameFrameX.Proto.Proto; global using GameFrameX.DataBase; -global using GameFrameX.DataBase.Mongo; global using GameFrameX.DataBase.Abstractions; -global using GameFrameX.Extension; -global using GameFrameX.Apps.Common.Event; global using GameFrameX.Utility; global using System.Collections; global using System.Collections.Concurrent; diff --git a/GameFrameX.Apps/Player/Player/Component/PlayerComponent.cs b/GameFrameX.Apps/Player/Player/Component/PlayerComponent.cs index 92669c41..c31d674b 100644 --- a/GameFrameX.Apps/Player/Player/Component/PlayerComponent.cs +++ b/GameFrameX.Apps/Player/Player/Component/PlayerComponent.cs @@ -1,8 +1,9 @@ using System.Threading.Tasks; using GameFrameX.Apps.Player.Player.Entity; -using GameFrameX.Core.Abstractions; +using GameFrameX.Core.Abstractions.Attribute; +using GameFrameX.Core.Components; using GameFrameX.Monitor.Player; -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps.Player.Player.Component; diff --git a/GameFrameX.Apps/Player/Player/Entity/PlayerState.cs b/GameFrameX.Apps/Player/Player/Entity/PlayerState.cs index d59e1f3d..324f169b 100644 --- a/GameFrameX.Apps/Player/Player/Entity/PlayerState.cs +++ b/GameFrameX.Apps/Player/Player/Entity/PlayerState.cs @@ -1,8 +1,13 @@ +using GameFrameX.DataBase.Mongo; + namespace GameFrameX.Apps.Player.Player.Entity; public class PlayerState : CacheState { - public long RoleId => Id; + public long RoleId + { + get { return Id; } + } /// /// 账号ID diff --git a/GameFrameX.Apps/Player/Role/Bag/Component/BagComponent.cs b/GameFrameX.Apps/Player/Role/Bag/Component/BagComponent.cs index 9219d611..0581660f 100644 --- a/GameFrameX.Apps/Player/Role/Bag/Component/BagComponent.cs +++ b/GameFrameX.Apps/Player/Role/Bag/Component/BagComponent.cs @@ -1,7 +1,7 @@ using GameFrameX.Apps.Player.Role.Bag.Entity; -using GameFrameX.Core.Abstractions; +using GameFrameX.Core.Abstractions.Attribute; using GameFrameX.Core.Components; -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps.Player.Role.Bag.Component; diff --git a/GameFrameX.Apps/Player/Role/Bag/Entity/BagState.cs b/GameFrameX.Apps/Player/Role/Bag/Entity/BagState.cs index 96ed3e16..89468546 100644 --- a/GameFrameX.Apps/Player/Role/Bag/Entity/BagState.cs +++ b/GameFrameX.Apps/Player/Role/Bag/Entity/BagState.cs @@ -1,6 +1,8 @@ +using GameFrameX.DataBase.Mongo; + namespace GameFrameX.Apps.Player.Role.Bag.Entity; public class BagState : CacheState { - public Dictionary ItemMap = new Dictionary(); + public Dictionary ItemMap = new(); } \ No newline at end of file diff --git a/GameFrameX.Apps/Player/Role/Pet/Component/PetComponent.cs b/GameFrameX.Apps/Player/Role/Pet/Component/PetComponent.cs index 16dc5c96..94a07f90 100644 --- a/GameFrameX.Apps/Player/Role/Pet/Component/PetComponent.cs +++ b/GameFrameX.Apps/Player/Role/Pet/Component/PetComponent.cs @@ -1,6 +1,7 @@ using GameFrameX.Apps.Player.Role.Pet.Entity; -using GameFrameX.Core.Abstractions; -using GameFrameX.Setting; +using GameFrameX.Core.Abstractions.Attribute; +using GameFrameX.Core.Components; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps.Player.Role.Pet.Component; diff --git a/GameFrameX.Apps/Player/Role/Pet/Entity/PetState.cs b/GameFrameX.Apps/Player/Role/Pet/Entity/PetState.cs index 901de4e9..078be5f1 100644 --- a/GameFrameX.Apps/Player/Role/Pet/Entity/PetState.cs +++ b/GameFrameX.Apps/Player/Role/Pet/Entity/PetState.cs @@ -1,3 +1,5 @@ +using GameFrameX.DataBase.Mongo; + namespace GameFrameX.Apps.Player.Role.Pet.Entity; public class PetState : CacheState diff --git a/GameFrameX.Apps/Server/Server/Component/ServerComponent.cs b/GameFrameX.Apps/Server/Server/Component/ServerComponent.cs index d1d35115..c8f9b61e 100644 --- a/GameFrameX.Apps/Server/Server/Component/ServerComponent.cs +++ b/GameFrameX.Apps/Server/Server/Component/ServerComponent.cs @@ -1,6 +1,7 @@ using GameFrameX.Apps.Server.Server.Entity; -using GameFrameX.Core.Abstractions; -using GameFrameX.Setting; +using GameFrameX.Core.Abstractions.Attribute; +using GameFrameX.Core.Components; +using GameFrameX.Utility.Setting; namespace GameFrameX.Apps.Server.Server.Component; diff --git a/GameFrameX.Apps/Server/Server/Entity/ServerState.cs b/GameFrameX.Apps/Server/Server/Entity/ServerState.cs index 98739f91..6e615f0d 100644 --- a/GameFrameX.Apps/Server/Server/Entity/ServerState.cs +++ b/GameFrameX.Apps/Server/Server/Entity/ServerState.cs @@ -1,3 +1,5 @@ +using GameFrameX.DataBase.Mongo; + namespace GameFrameX.Apps.Server.Server.Entity; public class ServerState : CacheState diff --git a/GameFrameX.CodeGenerator/Agent/AgentGenerator.cs b/GameFrameX.CodeGenerator/Agent/AgentGenerator.cs index d6933a74..04742c26 100644 --- a/GameFrameX.CodeGenerator/Agent/AgentGenerator.cs +++ b/GameFrameX.CodeGenerator/Agent/AgentGenerator.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using GameFrameX.CodeGenerator.Utils; using GameFrameX.Core.Abstractions.Attribute; -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; diff --git a/GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj b/GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj index 95eab4e5..64b04a94 100644 --- a/GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj +++ b/GameFrameX.CodeGenerator/GameFrameX.CodeGenerator.csproj @@ -17,8 +17,7 @@ - - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/GameFrameX.Config/ConfigComponent.cs b/GameFrameX.Config/ConfigComponent.cs index 7d2c9ef3..0765361f 100644 --- a/GameFrameX.Config/ConfigComponent.cs +++ b/GameFrameX.Config/ConfigComponent.cs @@ -1,6 +1,6 @@ using System.Text.Json; using GameFrameX.Core.Config; -using GameFrameX.Log; +using GameFrameX.Utility.Log; namespace GameFrameX.Config; diff --git a/GameFrameX.Config/GameFrameX.Config.csproj b/GameFrameX.Config/GameFrameX.Config.csproj index 208928a6..2aa51245 100644 --- a/GameFrameX.Config/GameFrameX.Config.csproj +++ b/GameFrameX.Config/GameFrameX.Config.csproj @@ -13,8 +13,8 @@ - - + + diff --git a/GameFrameX.Hotfix/Common/Events/EventDispatcherExtensions.cs b/GameFrameX.Hotfix/Common/Events/EventDispatcherExtensions.cs index 300bdcb4..582dfda1 100644 --- a/GameFrameX.Hotfix/Common/Events/EventDispatcherExtensions.cs +++ b/GameFrameX.Hotfix/Common/Events/EventDispatcherExtensions.cs @@ -3,6 +3,8 @@ using GameFrameX.Core.Abstractions.Agent; using GameFrameX.Core.Abstractions.Events; using GameFrameX.Hotfix.Logic.Server.Server; +using GameFrameX.Utility.Extensions; +using GameFrameX.Utility.Setting; namespace GameFrameX.Hotfix.Common.Events { diff --git a/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj b/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj index 25c7564d..23927544 100644 --- a/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj +++ b/GameFrameX.Hotfix/GameFrameX.Hotfix.csproj @@ -26,8 +26,7 @@ - - + diff --git a/GameFrameX.Hotfix/GlobalUsings.cs b/GameFrameX.Hotfix/GlobalUsings.cs index 2ffc988f..9ebe9890 100644 --- a/GameFrameX.Hotfix/GlobalUsings.cs +++ b/GameFrameX.Hotfix/GlobalUsings.cs @@ -5,7 +5,6 @@ global using MongoDB.Bson.Serialization.Attributes; global using GameFrameX.Proto.Proto; global using GameFrameX.Core; -global using GameFrameX.Log; global using GameFrameX.Core.Utility; global using GameFrameX.Core.Components; global using GameFrameX.Core.Events; @@ -13,7 +12,8 @@ global using GameFrameX.Core.Hotfix; global using GameFrameX.Core.Actors; global using GameFrameX.Core.Timer; -global using GameFrameX.Setting; -global using GameFrameX.Extension; global using GameFrameX.Utility; +global using GameFrameX.Utility.Setting; +global using GameFrameX.Utility.Extensions; +global using GameFrameX.Utility.Log; global using GameFrameX.NetWork.Abstractions; \ No newline at end of file diff --git a/GameFrameX.Launcher/GameFrameX.Launcher.csproj b/GameFrameX.Launcher/GameFrameX.Launcher.csproj index 1554729e..dc6d8b5e 100644 --- a/GameFrameX.Launcher/GameFrameX.Launcher.csproj +++ b/GameFrameX.Launcher/GameFrameX.Launcher.csproj @@ -36,10 +36,9 @@ - - - - + + + diff --git a/GameFrameX.Launcher/GlobalUsings.cs b/GameFrameX.Launcher/GlobalUsings.cs index 7a5d958c..131e170c 100644 --- a/GameFrameX.Launcher/GlobalUsings.cs +++ b/GameFrameX.Launcher/GlobalUsings.cs @@ -1,5 +1,4 @@ -global using GameFrameX.Log; -global using GameFrameX.Apps; +global using GameFrameX.Apps; global using GameFrameX.Config; global using GameFrameX.Core.Actors.Impl; global using GameFrameX.Core.Hotfix; @@ -7,7 +6,6 @@ global using GameFrameX.DataBase; global using System.Collections.Concurrent; global using System.Net; -global using GameFrameX.Setting; global using System.Buffers; global using System.Timers; global using GameFrameX.Launcher.StartUp; @@ -17,7 +15,7 @@ global using GameFrameX.NetWork; global using GameFrameX.Utility; global using GameFrameX.Launcher; -global using GameFrameX.Extension; +global using GameFrameX.Utility.Log; global using GameFrameX.SuperSocket; global using GameFrameX.SuperSocket.ClientEngine; global using GameFrameX.SuperSocket.Connection; diff --git a/GameFrameX.Launcher/StartUp/AppStartUpService.cs b/GameFrameX.Launcher/StartUp/AppStartUpService.cs index 44a364f7..848f9cba 100644 --- a/GameFrameX.Launcher/StartUp/AppStartUpService.cs +++ b/GameFrameX.Launcher/StartUp/AppStartUpService.cs @@ -1,14 +1,4 @@ -using GameFrameX.NetWork.Abstractions; -using GameFrameX.NetWork.ChannelBase; -using GameFrameX.NetWork.Message; -using GameFrameX.SuperSocket.Primitives; -using GameFrameX.SuperSocket.ProtoBase; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using Serilog; - + namespace GameFrameX.Launcher.StartUp; public abstract class AppStartUpService : AppStartUpBase diff --git a/GameFrameX.Launcher/StartUp/Game/AppStartUpGame.cs b/GameFrameX.Launcher/StartUp/Game/AppStartUpGame.cs index b0964d6c..29d50e64 100644 --- a/GameFrameX.Launcher/StartUp/Game/AppStartUpGame.cs +++ b/GameFrameX.Launcher/StartUp/Game/AppStartUpGame.cs @@ -1,5 +1,6 @@ using GameFrameX.Core.Components; using GameFrameX.DataBase.Mongo; +using GameFrameX.Utility.Setting; namespace GameFrameX.Launcher.StartUp.Game { diff --git a/GameFrameX.Proto/BuiltIn/DiscoveryCenter.cs b/GameFrameX.Proto/BuiltIn/DiscoveryCenter.cs index aeb8ff66..46b1757f 100644 --- a/GameFrameX.Proto/BuiltIn/DiscoveryCenter.cs +++ b/GameFrameX.Proto/BuiltIn/DiscoveryCenter.cs @@ -1,6 +1,6 @@ using GameFrameX.NetWork.Abstractions; using GameFrameX.NetWork.Messages; -using GameFrameX.Setting; +using GameFrameX.Utility.Setting; using ProtoBuf; namespace GameFrameX.Proto.BuiltIn; diff --git a/GameFrameX.Proto/GameFrameX.Proto.csproj b/GameFrameX.Proto/GameFrameX.Proto.csproj index 9d9fd1e6..5a9d1d93 100644 --- a/GameFrameX.Proto/GameFrameX.Proto.csproj +++ b/GameFrameX.Proto/GameFrameX.Proto.csproj @@ -5,7 +5,7 @@ - +