diff --git a/JiShe.CollectBus.Console/Extensions/ServiceCollections/ServiceCollectionExtensions.cs b/JiShe.CollectBus.Console/Extensions/ServiceCollections/ServiceCollectionExtensions.cs index 98f3eaf..fc6a0fb 100644 --- a/JiShe.CollectBus.Console/Extensions/ServiceCollections/ServiceCollectionExtensions.cs +++ b/JiShe.CollectBus.Console/Extensions/ServiceCollections/ServiceCollectionExtensions.cs @@ -17,14 +17,10 @@ namespace Microsoft.Extensions.DependencyInjection services.AddTcpService(config => { config.SetListenIPHosts(int.Parse(configuration["TCP:ClientPort"] ?? "10500")) - .ConfigureContainer(a => //容器的配置顺序应该在最前面 - { - a.AddConsoleLogger(); - }) .ConfigurePlugins(a => { a.Add(); - a.Add(); + a.Add(); a.Add(); }); }); @@ -40,13 +36,9 @@ namespace Microsoft.Extensions.DependencyInjection services.AddUdpSession(config => { config.SetBindIPHost(int.Parse(configuration["UDP:ClientPort"] ?? "10500")) - .ConfigureContainer(a => //容器的配置顺序应该在最前面 - { - //a.AddConsoleLogger(); - }) .ConfigurePlugins(a => { - a.Add(); + a.Add(); a.Add(); }) .UseBroadcast() diff --git a/JiShe.CollectBus.Core/Plugins/TcpServiceReceivedPlugin.cs b/JiShe.CollectBus.Core/Plugins/TcpServicePlugin.cs similarity index 93% rename from JiShe.CollectBus.Core/Plugins/TcpServiceReceivedPlugin.cs rename to JiShe.CollectBus.Core/Plugins/TcpServicePlugin.cs index ceab344..0b0f1dc 100644 --- a/JiShe.CollectBus.Core/Plugins/TcpServiceReceivedPlugin.cs +++ b/JiShe.CollectBus.Core/Plugins/TcpServicePlugin.cs @@ -9,15 +9,15 @@ using JiShe.CollectBus.MongoDB; namespace JiShe.CollectBus.Core.Plugins { - public partial class TcpServiceReceivedPlugin : PluginBase + public partial class TcpServicePlugin : PluginBase { private readonly INSender _nSender; - private readonly ILogger _logger; + private readonly ILogger _logger; public readonly IMongoRepository _mongoHeartbeatRepository; public readonly IMongoRepository _mongoLoginRepository; - public TcpServiceReceivedPlugin(INSender nSender, ILogger logger,IMongoRepository mongoHeartbeatRepository, IMongoRepository mongoLoginRepository) + public TcpServicePlugin(INSender nSender, ILogger logger,IMongoRepository mongoHeartbeatRepository, IMongoRepository mongoLoginRepository) { _nSender = nSender; _logger = logger; diff --git a/JiShe.CollectBus.Core/Plugins/UdpServiceReceivedPlugin.cs b/JiShe.CollectBus.Core/Plugins/UdpServicePlugin.cs similarity index 89% rename from JiShe.CollectBus.Core/Plugins/UdpServiceReceivedPlugin.cs rename to JiShe.CollectBus.Core/Plugins/UdpServicePlugin.cs index 186cd11..8004d5e 100644 --- a/JiShe.CollectBus.Core/Plugins/UdpServiceReceivedPlugin.cs +++ b/JiShe.CollectBus.Core/Plugins/UdpServicePlugin.cs @@ -4,7 +4,7 @@ using TouchSocket.Sockets; namespace JiShe.CollectBus.Core.Plugins { - public partial class UdpServiceReceivedPlugin : PluginBase + public partial class UdpServicePlugin : PluginBase { [GeneratorPlugin(typeof(IUdpReceivedPlugin))] public async Task OnUdpReceived(IUdpSessionBase client, UdpReceivedDataEventArgs e)