diff --git a/src/Luban.Client/Source/Program.cs b/src/Luban.Client/Source/Program.cs index f6c5f99..9652465 100644 --- a/src/Luban.Client/Source/Program.cs +++ b/src/Luban.Client/Source/Program.cs @@ -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) { diff --git a/src/Luban.Job.Db/Source/Generate/SyncCsRender.cs b/src/Luban.Job.Db/Source/Generate/SyncCsRender.cs index bc3886d..a32ea2c 100644 --- a/src/Luban.Job.Db/Source/Generate/SyncCsRender.cs +++ b/src/Luban.Job.Db/Source/Generate/SyncCsRender.cs @@ -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;}