From 17f7fc5b1bb3a9c6b7d285a832dc962080971af5 Mon Sep 17 00:00:00 2001 From: walon Date: Thu, 20 May 2021 20:34:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90db=E3=80=91=E4=BF=AE=E5=A4=8D=20db?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E5=A4=9A=E6=80=81=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=9C=89=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Client/Source/Program.cs | 6 ++++-- src/Luban.Job.Db/Source/Generate/SyncCsRender.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) 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;}