From a6c743c78b8c44845f3bd6078d5d4b70fcc03a55 Mon Sep 17 00:00:00 2001 From: Mikhail Mitrofanov Date: Tue, 18 Mar 2025 23:08:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B5=D0=BA=D1=82=20=D0=B4=D0=BB=D1=8F=20codegen-tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Example.Backend/Printer.cs | 3 ++- mROA.CodegenTools/mROA.CodegenTools.csproj | 7 +++++++ mROA.sln | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 mROA.CodegenTools/mROA.CodegenTools.csproj diff --git a/Example.Backend/Printer.cs b/Example.Backend/Printer.cs index eba0d19..87958c9 100644 --- a/Example.Backend/Printer.cs +++ b/Example.Backend/Printer.cs @@ -12,6 +12,7 @@ namespace Example.Backend public void OnPrintExternal(IPage p0, RequestContext ro) { + OnPrint?.Invoke(p0, ro); } public double Resource { get; set; } = 100d; @@ -27,7 +28,7 @@ namespace Example.Backend // throw new Exception("The method or operation is not implemented."); var page = new Page { Text = text }; Console.WriteLine($"Request id : :{context.RequestId}"); - OnPrint?.Invoke(page, new RequestContext(Guid.NewGuid(), 132)); + OnPrint?.Invoke(page, context); Resource /= 1.5; return page; } diff --git a/mROA.CodegenTools/mROA.CodegenTools.csproj b/mROA.CodegenTools/mROA.CodegenTools.csproj new file mode 100644 index 0000000..d2a210c --- /dev/null +++ b/mROA.CodegenTools/mROA.CodegenTools.csproj @@ -0,0 +1,7 @@ + + + + netstandard2.0 + + + diff --git a/mROA.sln b/mROA.sln index 1cfa5fa..6ca35dc 100644 --- a/mROA.sln +++ b/mROA.sln @@ -31,6 +31,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example.Events.Backend", "E EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example.Events.Client", "Example.Events.Client\Example.Events.Client.csproj", "{98451C0E-E179-4F5F-9F1A-8B353EDE2EBC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mROA.CodegenTools", "mROA.CodegenTools\mROA.CodegenTools.csproj", "{2A2821B7-E5C5-443A-9801-9622493594A0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -81,6 +83,10 @@ Global {98451C0E-E179-4F5F-9F1A-8B353EDE2EBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {98451C0E-E179-4F5F-9F1A-8B353EDE2EBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {98451C0E-E179-4F5F-9F1A-8B353EDE2EBC}.Release|Any CPU.Build.0 = Release|Any CPU + {2A2821B7-E5C5-443A-9801-9622493594A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A2821B7-E5C5-443A-9801-9622493594A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A2821B7-E5C5-443A-9801-9622493594A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A2821B7-E5C5-443A-9801-9622493594A0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE