2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00

LoadGenerated bug

This commit is contained in:
Ahmed Zamil 2023-01-14 01:44:07 +03:00
parent 73fb67b860
commit 33f6933693
2 changed files with 3 additions and 2 deletions

View File

@ -142,7 +142,7 @@ public static class Warehouse
}
var enumsTypes = (Type[])generatedType.GetProperty("Enums").GetValue(null);
foreach (var t in recordTypes)
foreach (var t in enumsTypes)
{
PutTemplate(new TypeTemplate(t));
}
@ -753,6 +753,7 @@ public static class Warehouse
/// <param name="template">Resource template.</param>
public static void PutTemplate(TypeTemplate template)
{
Console.WriteLine(template.ClassName);
if (templates[template.Type].ContainsKey(template.ClassId))
throw new Exception($"Template with same class Id already exists. {templates[template.Type][template.ClassId].ClassName} -> {template.ClassName}");