Align client and solution with renamed projects

Update project references and solution entries to use
`PipeClient` and `PipeServer`, and launch the renamed
`PipeServer.exe` or `PipeServer.dll`.
This commit is contained in:
Matthias Heil
2026-11-10 10:57:10 +01:00
parent f00e3298b1
commit ae723b9bea
9 changed files with 15 additions and 15 deletions
+19
View File
@@ -0,0 +1,19 @@
using System.Numerics;
namespace PipeShared;
public interface IServerMethods
{
int Add(int a, int b);
Vector3 AddVector(Vector3 a, Vector3 b);
double Divide(double a, double b);
Task<string> EchoAsync(string text);
Task<int> SlowOperationAsync(int delayMs, Guid operationId);
void CancelOperation(Guid operationId);
void Crash(int exitCode);
}
public static class PipeConstants
{
public const string PipeNameArgPrefix = "--pipe=";
}
+16
View File
@@ -0,0 +1,16 @@
using PipeMethodCalls;
using System.Text.Json;
namespace PipeShared;
/// <summary>
/// JSON serializer that also includes public fields (required for System.Numerics.Vector3).
/// </summary>
public class JsonFieldsPipeSerializer : IPipeSerializer
{
private static readonly JsonSerializerOptions Options = new() { IncludeFields = true };
public object Deserialize(byte[] data, Type type) => JsonSerializer.Deserialize(data, type, Options)!;
public byte[] Serialize(object o) => JsonSerializer.SerializeToUtf8Bytes(o, Options);
}
+13
View File
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="PipeMethodCalls" Version="4.0.3" />
</ItemGroup>
</Project>