Browse Source

当类的某个属性只有Get,没有set属性,该类会有<>c的Type,对<>的屏蔽

felix 2 years ago
parent
commit
7533ba3148
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Helper/CodeGenerator.cs

+ 1 - 1
Helper/CodeGenerator.cs

@@ -49,7 +49,7 @@ namespace FlutterCodeGenerator.Helper
             var assemblybytes = File.ReadAllBytes(dll);
             var assembly = Assembly.Load(assemblybytes);
             var allTypes = assembly.GetTypes();
-            var restTypes = allTypes.Where(x => !x.FullName.Contains("DB") && !x.Name.EndsWith("ManagementService") && !x.Name.EndsWith("NotificationService") && !x.FullName.Contains(".Internal.")).ToList();
+            var restTypes = allTypes.Where(x => !x.FullName.Contains("DB") && !x.Name.EndsWith("ManagementService") && !x.Name.EndsWith("NotificationService") && !x.FullName.Contains(".Internal.") && !x.FullName.Contains("<>")).ToList();//当某个属性只有Get,没有set属性,该类会有<>c的Type
             var interfaceTypes = restTypes.Where(x => x.FullName.EndsWith("Service") && x.IsInterface).ToList();
             restTypes = restTypes.Except(interfaceTypes).ToList();
             var inotificationDTOType = restTypes.FirstOrDefault(x => x.Name.Contains("INotificationDTO"));