Renamed IServerMethods to `IPipeServerMethods

This commit is contained in:
Matthias Heil
2026-11-10 11:08:33 +01:00
parent 3fe7fa42e5
commit e1acf71c5d
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ Log("Client started.");
string pipeName = $"PipeDemo-{Environment.ProcessId}-{Guid.NewGuid():N}";
Process? serverProcess = null;
PipeClient<IServerMethods> client = null!;
PipeClient<IPipeServerMethods> client = null!;
try
{
@@ -161,7 +161,7 @@ async Task StartServerAndConnectAsync(string pipeName)
};
serverProcess = process;
client = new PipeClient<IServerMethods>(new JsonFieldsPipeSerializer(), pipeName);
client = new PipeClient<IPipeServerMethods>(new JsonFieldsPipeSerializer(), pipeName);
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10));
await client.ConnectAsync(cts.Token);
}
+1 -1
View File
@@ -9,7 +9,7 @@ Console.WriteLine($"Server started. Pipe: {pipeName}");
// Exceptions in handler methods are caught by PipeMethodCalls and sent to the client
// (client receives PipeInvokeFailedException with the server exception details).
var server = new PipeServer<IServerMethods>(
var server = new PipeServer<IPipeServerMethods>(
new JsonFieldsPipeSerializer(),
pipeName,
() => new ServerMethods());
+1 -1
View File
@@ -4,7 +4,7 @@ using System.Numerics;
namespace Server;
public class ServerMethods : IServerMethods
public class ServerMethods : IPipeServerMethods
{
public int Add(int a, int b) => a + b;
@@ -2,7 +2,7 @@ using System.Numerics;
namespace PipeShared;
public interface IServerMethods
public interface IPipeServerMethods
{
int Add(int a, int b);
Vector3 AddVector(Vector3 a, Vector3 b);