Initial commit

This commit is contained in:
Holger Börchers
2026-01-30 15:31:43 +01:00
commit 894fbbfa5a
22 changed files with 1701 additions and 0 deletions

20
CommIpc/PipeName.cs Normal file
View File

@@ -0,0 +1,20 @@
using System.Diagnostics;
namespace CommIpc;
public static class PipeName
{
/// <summary>
/// Creates a pipe name that is unique per parent process instance and child id.
/// </summary>
public static string ForChild(int childId, int? parentPid = null)
{
parentPid ??= Environment.ProcessId;
return $"CommTester_{parentPid}_{childId}";
}
/// <summary>
/// Helpful for logs / debugging.
/// </summary>
public static string Describe(string pipeName) => $"\\\\.\\pipe\\{pipeName}";
}