Refactor PipeClient to use ServerConnection wrapper and rename Server namespace

Introduce ServerConnection class in PipeClient to encapsulate server process
lifecycle, connection, restart, and cleanup instead of inline Process management.
Pass PipeClient<IPipeServerMethods> explicitly to example methods rather than
relying on a module-level field.

Rename namespace Server to PipeServer in PipeServer project and update
corresponding using directives.

Update error messages in ServerMethods to English.
This commit is contained in:
2026-11-10 13:07:21 +01:00
parent e1acf71c5d
commit beb7086867
3 changed files with 36 additions and 87 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
using PipeShared;
using PipeMethodCalls;
using Server;
using PipeServer;
string pipeName = args.FirstOrDefault(static a => a.StartsWith(PipeConstants.PipeNameArgPrefix, StringComparison.Ordinal))?
var pipeName = args.FirstOrDefault(static a => a.StartsWith(PipeConstants.PipeNameArgPrefix, StringComparison.Ordinal))?
[PipeConstants.PipeNameArgPrefix.Length..] ?? "PipeDemo";
Console.WriteLine($"Server started. Pipe: {pipeName}");