|
|
@@ -1,5 +1,10 @@ |
|
|
|
using JT808.Gateway.InMemoryMQ; |
|
|
|
using JT808.Gateway.Abstractions.Enums; |
|
|
|
using JT808.Gateway.InMemoryMQ; |
|
|
|
using JT808.Gateway.ReplyMessage; |
|
|
|
using JT808.Gateway.MsgLogging; |
|
|
|
using JT808.Gateway.Traffic; |
|
|
|
using JT808.Gateway.MsgIdHandler; |
|
|
|
using JT808.Gateway.SessionNotice; |
|
|
|
using JT808.Protocol; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
@@ -8,6 +13,7 @@ using Microsoft.Extensions.Hosting; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using JT808.Gateway.SimpleServer.Impl; |
|
|
|
|
|
|
|
namespace JT808.Gateway.SimpleServer |
|
|
|
{ |
|
|
@@ -33,8 +39,14 @@ namespace JT808.Gateway.SimpleServer |
|
|
|
services.AddJT808Configure() |
|
|
|
.AddGateway(hostContext.Configuration) |
|
|
|
.AddTcp() |
|
|
|
.AddServerInMemoryMQ() |
|
|
|
.AddServerInMemoryMQ(JT808ConsumerType.MsgIdHandlerConsumer| |
|
|
|
JT808ConsumerType.ReplyMessageConsumer | |
|
|
|
JT808ConsumerType.MsgLoggingConsumer | |
|
|
|
JT808ConsumerType.ReplyMessageLoggingConsumer) |
|
|
|
.AddInMemoryMsgIdHandler<JT808MsgIdHandler>() |
|
|
|
.AddInMemoryReplyMessage() |
|
|
|
.AddInMemoryMsgLogging<JT808MsgLogging>() |
|
|
|
.AddInMemorySessionNotice() |
|
|
|
.Builder(); |
|
|
|
}); |
|
|
|
|
|
|
|