Merge pull request #23 from kteong1012/main

[fix] 修复了导出多维数组失败的bug
[fix] 修复CS模板处理嵌套命名空间的bug
main
walon 2022-09-23 10:05:32 +08:00 committed by GitHub
commit 14faa26565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 20 deletions

View File

@ -26,6 +26,10 @@ namespace Luban.Job.Common.Types
Dimension = (ElementType as TArray).Dimension + 1; Dimension = (ElementType as TArray).Dimension + 1;
FinalElementType = (ElementType as TArray).FinalElementType; FinalElementType = (ElementType as TArray).FinalElementType;
} }
else
{
FinalElementType = elementType;
}
} }
public override bool TryParseFrom(string s) public override bool TryParseFrom(string s)

View File

@ -7,7 +7,7 @@ using Bright.Serialization;
}} }}
{{cs_start_name_space_grace x.namespace_with_top_module}} {{cs_start_name_space_grace x.namespace}}
public partial class {{name}} public partial class {{name}}
{ {
{{~for table in tables ~}} {{~for table in tables ~}}
@ -45,4 +45,4 @@ public partial class {{name}}
partial void PostResolve(); partial void PostResolve();
} }
{{cs_end_name_space_grace x.namespace_with_top_module}} {{cs_end_name_space_grace x.namespace}}

View File

@ -10,8 +10,7 @@ using System.Text.Json;
hierarchy_export_fields = x.hierarchy_export_fields hierarchy_export_fields = x.hierarchy_export_fields
}} }}
namespace {{x.namespace_with_top_module}} {{cs_start_name_space_grace x.namespace_with_top_module}}
{
{{~if x.comment != '' ~}} {{~if x.comment != '' ~}}
/// <summary> /// <summary>
@ -124,4 +123,4 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} {
partial void PostInit(); partial void PostInit();
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace_with_top_module}}

View File

@ -10,8 +10,8 @@ using System.Text.Json;
value_type = x.value_ttype value_type = x.value_ttype
}} }}
namespace {{x.namespace_with_top_module}} {{cs_start_name_space_grace x.namespace_with_top_module}}
{
{{~if x.comment != '' ~}} {{~if x.comment != '' ~}}
/// <summary> /// <summary>
@ -170,4 +170,4 @@ public sealed partial class {{name}}
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace_with_top_module}}

View File

@ -5,8 +5,8 @@ using System.Text.Json;
namespace = x.namespace namespace = x.namespace
tables = x.tables tables = x.tables
}} }}
namespace {{namespace}} {{cs_start_name_space_grace x.namespace}}
{
public sealed partial class {{name}} public sealed partial class {{name}}
{ {
@ -45,4 +45,4 @@ public sealed partial class {{name}}
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace}}

View File

@ -10,8 +10,7 @@ using SimpleJSON;
hierarchy_export_fields = x.hierarchy_export_fields hierarchy_export_fields = x.hierarchy_export_fields
}} }}
namespace {{x.namespace_with_top_module}} {{cs_start_name_space_grace x.namespace_with_top_module}}
{
{{~if x.comment != '' ~}} {{~if x.comment != '' ~}}
/// <summary> /// <summary>
@ -125,4 +124,4 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} {
partial void PostInit(); partial void PostInit();
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace_with_top_module}}

View File

@ -10,8 +10,7 @@ using SimpleJSON;
value_type = x.value_ttype value_type = x.value_ttype
}} }}
namespace {{x.namespace_with_top_module}} {{cs_start_name_space_grace x.namespace_with_top_module}}
{
{{~if x.comment != '' ~}} {{~if x.comment != '' ~}}
/// <summary> /// <summary>
@ -174,4 +173,4 @@ public sealed partial class {{name}}
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace_with_top_module}}

View File

@ -5,8 +5,8 @@ using SimpleJSON;
namespace = x.namespace namespace = x.namespace
tables = x.tables tables = x.tables
}} }}
namespace {{namespace}}
{ {{cs_start_name_space_grace x.namespace}}
public sealed partial class {{name}} public sealed partial class {{name}}
{ {
@ -45,4 +45,4 @@ public sealed partial class {{name}}
partial void PostResolve(); partial void PostResolve();
} }
} {{cs_end_name_space_grace x.namespace}}