commit
70b5a9b061
|
|
@ -312,5 +312,27 @@ namespace Luban.Job.Cfg.Utils
|
|||
{
|
||||
return type.Apply(CsEditorInitValueVisitor.Ins);
|
||||
}
|
||||
public static string CsStartNameSpaceGrace(string np)
|
||||
{
|
||||
if (string.IsNullOrEmpty(np))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"namespace {np}\n{{";
|
||||
}
|
||||
}
|
||||
public static string CsEndNameSpaceGrace(string np)
|
||||
{
|
||||
if (string.IsNullOrEmpty(np))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
items = x.items
|
||||
~}}
|
||||
|
||||
namespace {{namespace_with_top_module}}
|
||||
{
|
||||
|
||||
{{cs_start_name_space_grace x.namespace_with_top_module}}
|
||||
{{~if comment != '' ~}}
|
||||
/// <summary>
|
||||
/// {{comment | html.escape}}
|
||||
|
|
@ -26,4 +26,5 @@ namespace {{namespace_with_top_module}}
|
|||
{{item.name}} = {{item.value}},
|
||||
{{~end~}}
|
||||
}
|
||||
}
|
||||
|
||||
{{cs_end_name_space_grace x.namespace_with_top_module}}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Bright.Serialization;
|
||||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
{{
|
||||
name = x.name
|
||||
|
|
@ -7,10 +7,7 @@ using System.Collections.Generic;
|
|||
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 != '' ~}}
|
||||
/// <summary>
|
||||
/// {{x.escape_comment}}
|
||||
|
|
@ -115,4 +112,4 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} {
|
|||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
{{cs_end_name_space_grace x.namespace_with_top_module}}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace {{x.namespace_with_top_module}}
|
||||
{
|
||||
|
||||
{{cs_start_name_space_grace x.namespace_with_top_module}}
|
||||
{{
|
||||
name = x.name
|
||||
key_type = x.key_ttype
|
||||
|
|
@ -170,4 +170,4 @@ public partial class {{name}}
|
|||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
{{cs_end_name_space_grace x.namespace_with_top_module}}
|
||||
|
|
@ -6,9 +6,8 @@ using Bright.Serialization;
|
|||
tables = x.tables
|
||||
|
||||
}}
|
||||
namespace {{namespace}}
|
||||
{
|
||||
|
||||
{{cs_start_name_space_grace x.namespace_with_top_module}}
|
||||
public partial class {{name}}
|
||||
{
|
||||
{{~for table in tables ~}}
|
||||
|
|
@ -46,4 +45,4 @@ public partial class {{name}}
|
|||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
{{cs_end_name_space_grace x.namespace_with_top_module}}
|
||||
|
|
@ -10,8 +10,7 @@ using SimpleJSON;
|
|||
fields = x.fields
|
||||
}}
|
||||
|
||||
namespace {{x.namespace_with_editor_top_module}}
|
||||
{
|
||||
{{cs_start_name_space_grace x.namespace_with_editor_top_module}}
|
||||
|
||||
{{~if x.comment != '' ~}}
|
||||
/// <summary>
|
||||
|
|
@ -108,3 +107,5 @@ public {{x.cs_class_modifier}} partial class {{name}} : {{if parent_def_type}} {
|
|||
{{~end~}}
|
||||
}
|
||||
}
|
||||
|
||||
{{cs_end_name_space_grace x.namespace_with_editor_top_module}}
|
||||
|
|
@ -5,9 +5,7 @@
|
|||
itemType = 'Bright.Config.EditorEnumItemInfo'
|
||||
~}}
|
||||
|
||||
namespace {{x.namespace_with_editor_top_module}}
|
||||
{
|
||||
|
||||
{{cs_start_name_space_grace x.namespace_with_editor_top_module}}
|
||||
{{~if comment != '' ~}}
|
||||
/// <summary>
|
||||
/// {{comment | html.escape}}
|
||||
|
|
@ -58,4 +56,5 @@ namespace {{x.namespace_with_editor_top_module}}
|
|||
return __items.Find(c => c.Value == value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{{cs_end_name_space_grace x.namespace_with_editor_top_module}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue