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:
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user