From a3f6c7fa98523848af987baf4bcee0f9c006f203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=90=E6=B5=AA=E4=BA=BA?= Date: Mon, 30 Aug 2021 10:41:24 +0800 Subject: [PATCH] Update JT808_0x0900_Custom_Factory.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改错误类型 --- src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs b/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs index fa583cb..eda96b4 100644 --- a/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs +++ b/src/JT808.Protocol/Internal/JT808_0x0900_Custom_Factory.cs @@ -19,11 +19,11 @@ namespace JT808.Protocol.Internal public void Register(Assembly externalAssembly) { - var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0200_CustomBodyBase)).ToList(); + var types = externalAssembly.GetTypes().Where(w => w.BaseType == typeof(JT808_0x0900_BodyBase)).ToList(); foreach(var type in types) { var instance = Activator.CreateInstance(type); - var attachid = (byte)type.GetProperty(nameof(JT808_0x0200_CustomBodyBase.AttachInfoId)).GetValue(instance); + var attachid = (byte)type.GetProperty(nameof(JT808_0x0900_BodyBase.PassthroughType)).GetValue(instance); if (Map.ContainsKey(attachid)) { throw new ArgumentException($"{type.FullName} {attachid} An element with the same key already exists.");