From cc5c595948305981ceadef95889ffeab017dd2b7 Mon Sep 17 00:00:00 2001 From: Mikhail Mitrofanov Date: Wed, 5 Feb 2025 12:10:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8F=D0=BC=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=8E?= =?UTF-8?q?=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mROA.Codegen/SampleIncrementalSourceGenerator.cs | 1 + .../obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs | 2 +- mROA.Codegen/obj/mROA.Codegen.csproj.nuget.g.props | 6 +++--- mROA.Example/Main.cs | 2 ++ mROA.Example/obj/Debug/net9.0/mROA.Example.AssemblyInfo.cs | 2 +- mROA.Example/obj/mROA.Example.csproj.nuget.g.props | 4 ++-- mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs | 2 +- mROA.Test/obj/mROA.Test.csproj.nuget.g.props | 6 +++--- mROA/Implementation/Backend/JsonSerialisationModule.cs | 5 ++++- mROA/Implementation/FinalCommandExecution.cs | 1 + .../Frontend/JsonFrontendSerialisationModule.cs | 1 + mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs | 2 +- .../net9.0/mROA.GeneratedMSBuildEditorConfig.editorconfig | 2 +- mROA/obj/mROA.csproj.nuget.g.props | 4 ++-- 14 files changed, 24 insertions(+), 16 deletions(-) diff --git a/mROA.Codegen/SampleIncrementalSourceGenerator.cs b/mROA.Codegen/SampleIncrementalSourceGenerator.cs index 70e9e23..5c9e980 100644 --- a/mROA.Codegen/SampleIncrementalSourceGenerator.cs +++ b/mROA.Codegen/SampleIncrementalSourceGenerator.cs @@ -244,6 +244,7 @@ public class CoCodegenMethodRepository :IMethodRepository var fronendRepoCode = @$"// using System.Collections.Frozen; +using mROA.Implementation; namespace mROA.Codegen; diff --git a/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs b/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs index 204e091..2df56f9 100644 --- a/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs +++ b/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fd1eda26618b8cebe94eaa0e27ce5e97353d2d09")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f51dd93c8755e9e879dfa42a02f470d64a7d711a")] [assembly: System.Reflection.AssemblyProductAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA.Codegen/obj/mROA.Codegen.csproj.nuget.g.props b/mROA.Codegen/obj/mROA.Codegen.csproj.nuget.g.props index 6f36b67..353ed1c 100644 --- a/mROA.Codegen/obj/mROA.Codegen.csproj.nuget.g.props +++ b/mROA.Codegen/obj/mROA.Codegen.csproj.nuget.g.props @@ -5,18 +5,18 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Mimm\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Mikhail\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference 6.12.0 - + - C:\Users\Mimm\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.4 + C:\Users\Mikhail\.nuget\packages\microsoft.codeanalysis.analyzers\3.3.4 \ No newline at end of file diff --git a/mROA.Example/Main.cs b/mROA.Example/Main.cs index 4fa1f1f..f2ab4a4 100644 --- a/mROA.Example/Main.cs +++ b/mROA.Example/Main.cs @@ -1,4 +1,5 @@ using System.Runtime.InteropServices; +using mROA.Implementation; namespace mROA.Example; @@ -6,6 +7,7 @@ public class MainX { public static void Main(string[] args) { + IRemoteObject x; // CoCodegenMethodRepository a = new CoCodegenMethodRepository(); unsafe { diff --git a/mROA.Example/obj/Debug/net9.0/mROA.Example.AssemblyInfo.cs b/mROA.Example/obj/Debug/net9.0/mROA.Example.AssemblyInfo.cs index 1c37773..99f27b3 100644 --- a/mROA.Example/obj/Debug/net9.0/mROA.Example.AssemblyInfo.cs +++ b/mROA.Example/obj/Debug/net9.0/mROA.Example.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Example")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fd1eda26618b8cebe94eaa0e27ce5e97353d2d09")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f51dd93c8755e9e879dfa42a02f470d64a7d711a")] [assembly: System.Reflection.AssemblyProductAttribute("mROA.Example")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA.Example")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA.Example/obj/mROA.Example.csproj.nuget.g.props b/mROA.Example/obj/mROA.Example.csproj.nuget.g.props index 7f9c9db..721d876 100644 --- a/mROA.Example/obj/mROA.Example.csproj.nuget.g.props +++ b/mROA.Example/obj/mROA.Example.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Mimm\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Mikhail\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference 6.12.0 - + \ No newline at end of file diff --git a/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs b/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs index 1230625..81423e9 100644 --- a/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs +++ b/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fd1eda26618b8cebe94eaa0e27ce5e97353d2d09")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f51dd93c8755e9e879dfa42a02f470d64a7d711a")] [assembly: System.Reflection.AssemblyProductAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA.Test/obj/mROA.Test.csproj.nuget.g.props b/mROA.Test/obj/mROA.Test.csproj.nuget.g.props index f0b8464..92a05d6 100644 --- a/mROA.Test/obj/mROA.Test.csproj.nuget.g.props +++ b/mROA.Test/obj/mROA.Test.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Mimm\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Mikhail\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference 6.12.0 - + @@ -21,6 +21,6 @@ - C:\Users\Mimm\.nuget\packages\nunit.analyzers\4.6.0 + C:\Users\Mikhail\.nuget\packages\nunit.analyzers\4.6.0 \ No newline at end of file diff --git a/mROA/Implementation/Backend/JsonSerialisationModule.cs b/mROA/Implementation/Backend/JsonSerialisationModule.cs index 5bc20c2..e9b589a 100644 --- a/mROA/Implementation/Backend/JsonSerialisationModule.cs +++ b/mROA/Implementation/Backend/JsonSerialisationModule.cs @@ -28,7 +28,10 @@ public class JsonSerialisationModule : ISerialisationModule public void PostResponse(ICommandExecution call) { var texted = string.Empty; - if (call is FinalCommandExecution finalCommand) + if (call is TypedFinalCommandExecution nonVoidCall) + { + texted = JsonSerializer.Serialize(nonVoidCall); + }else if (call is FinalCommandExecution finalCommand) { texted = JsonSerializer.Serialize(finalCommand); }else if (call is AsyncCommandExecution asyncCommand) diff --git a/mROA/Implementation/FinalCommandExecution.cs b/mROA/Implementation/FinalCommandExecution.cs index 120084f..d6a96a3 100644 --- a/mROA/Implementation/FinalCommandExecution.cs +++ b/mROA/Implementation/FinalCommandExecution.cs @@ -18,6 +18,7 @@ public class FinalCommandExecution : FinalCommandExecution public class TypedFinalCommandExecution : FinalCommandExecution { + [JsonIgnore] public Type Type { get; set; } } diff --git a/mROA/Implementation/Frontend/JsonFrontendSerialisationModule.cs b/mROA/Implementation/Frontend/JsonFrontendSerialisationModule.cs index 328cb2a..42c2d42 100644 --- a/mROA/Implementation/Frontend/JsonFrontendSerialisationModule.cs +++ b/mROA/Implementation/Frontend/JsonFrontendSerialisationModule.cs @@ -24,6 +24,7 @@ public class JsonFrontendSerialisationModule public async Task> GetFinalCommandExecution(Guid requestId) { var receiveMessage = await _interactionModule.ReceiveMessage(); + var str = Encoding.UTF8.GetString(receiveMessage); var parsed = JsonSerializer.Deserialize>(receiveMessage); while (parsed.CallRequestId != requestId) { diff --git a/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs b/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs index ffc04be..c692900 100644 --- a/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs +++ b/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fd1eda26618b8cebe94eaa0e27ce5e97353d2d09")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f51dd93c8755e9e879dfa42a02f470d64a7d711a")] [assembly: System.Reflection.AssemblyProductAttribute("mROA")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA/obj/Debug/net9.0/mROA.GeneratedMSBuildEditorConfig.editorconfig b/mROA/obj/Debug/net9.0/mROA.GeneratedMSBuildEditorConfig.editorconfig index c1caa79..6ec64ed 100644 --- a/mROA/obj/Debug/net9.0/mROA.GeneratedMSBuildEditorConfig.editorconfig +++ b/mROA/obj/Debug/net9.0/mROA.GeneratedMSBuildEditorConfig.editorconfig @@ -8,7 +8,7 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = mROA -build_property.ProjectDir = C:\Users\Mimm\Projects\VisualStudioProjects\mROA\mROA\ +build_property.ProjectDir = C:\Users\Mikhail\Projects\VisualStudioProjects\mROA\mROA\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EffectiveAnalysisLevelStyle = 9.0 diff --git a/mROA/obj/mROA.csproj.nuget.g.props b/mROA/obj/mROA.csproj.nuget.g.props index 7f9c9db..721d876 100644 --- a/mROA/obj/mROA.csproj.nuget.g.props +++ b/mROA/obj/mROA.csproj.nuget.g.props @@ -5,12 +5,12 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Mimm\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\Mikhail\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages PackageReference 6.12.0 - + \ No newline at end of file