【db】修复 db生成的多态代码有编译错误的bug

main
walon 2021-05-20 20:34:21 +08:00
parent 5f07daa657
commit 17f7fc5b1b
2 changed files with 5 additions and 3 deletions

View File

@ -157,8 +157,9 @@ Options:
if (string.IsNullOrWhiteSpace(options.WatchDir))
{
Environment.Exit(GenOnce(options, profile));
int exitCode = GenOnce(options, profile);
profile.EndPhaseAndLog();
Environment.Exit(exitCode);
}
else
{
@ -222,7 +223,7 @@ Options:
int exitCode;
try
{
profile.StartPhase("generation");
profile.StartPhase("connect server");
var conn = GenClient.Start(options.Host, options.Port, ProtocolStub.Factories);
@ -236,6 +237,7 @@ Options:
profile.StartPhase("gen job");
exitCode = SubmitGenJob(options);
profile.EndPhaseAndLog();
profile.EndPhaseAndLog();
}
catch (Exception e)
{

View File

@ -50,7 +50,7 @@ using Bright.Serialization;
namespace {{x.namespace_with_top_module}}
{
public interface {{readonly_name}} {{if parent_def_type}}: IReadOnly{{x.parent}} {{end}}
public interface {{readonly_name}} {{if parent_def_type}}: IReadOnly{{x.parent_def_type.name}} {{end}}
{
{{~ for field in fields~}}
{{db_cs_readonly_define_type field.ctype}} {{field.cs_style_name}} {get;}