diff --git a/src/libs/H.Pipes/H.Pipes.csproj b/src/libs/H.Pipes/H.Pipes.csproj
index 6ec5765..790ebce 100644
--- a/src/libs/H.Pipes/H.Pipes.csproj
+++ b/src/libs/H.Pipes/H.Pipes.csproj
@@ -21,6 +21,11 @@
- Supports `PipeAccessRule`'s(see `H.Pipes.AccessControl` nuget package) or more complex code to access using the `PipeServer.PipeStreamInitializeAction` property
+
+
+
+
+
@@ -30,10 +35,14 @@
-
+
+
+
+
+
all
diff --git a/src/libs/H.Pipes/PipeClient.cs b/src/libs/H.Pipes/PipeClient.cs
index 59d5158..202b756 100644
--- a/src/libs/H.Pipes/PipeClient.cs
+++ b/src/libs/H.Pipes/PipeClient.cs
@@ -108,7 +108,7 @@ private void OnExceptionOccurred(Exception exception)
/// Name of the server's pipe
/// the Name of the server, default is local machine
/// Default reconnection interval -
- /// Default formatter -
+ /// Default formatter -
public PipeClient(string pipeName, string serverName = ".", TimeSpan? reconnectionInterval = default, IFormatter? formatter = default)
{
PipeName = pipeName;
@@ -141,7 +141,7 @@ public PipeClient(string pipeName, string serverName = ".", TimeSpan? reconnecti
}
};
- Formatter = formatter ?? new BinaryFormatter();
+ Formatter = formatter ?? new DefaultFormatter();
}
#endregion
diff --git a/src/libs/H.Pipes/PipeServer.cs b/src/libs/H.Pipes/PipeServer.cs
index bd252a9..5162cd6 100644
--- a/src/libs/H.Pipes/PipeServer.cs
+++ b/src/libs/H.Pipes/PipeServer.cs
@@ -115,11 +115,11 @@ private void OnExceptionOccurred(Exception exception)
/// Constructs a new NamedPipeServer object that listens for client connections on the given .
///
/// Name of the pipe to listen on
- /// Default formatter -
+ /// Default formatter -
public PipeServer(string pipeName, IFormatter? formatter = default)
{
PipeName = pipeName;
- Formatter = formatter ?? new BinaryFormatter();
+ Formatter = formatter ?? new DefaultFormatter();
}
#endregion
diff --git a/src/libs/H.Pipes/SingleConnectionPipeClient.cs b/src/libs/H.Pipes/SingleConnectionPipeClient.cs
index 1d26692..f2faa5e 100644
--- a/src/libs/H.Pipes/SingleConnectionPipeClient.cs
+++ b/src/libs/H.Pipes/SingleConnectionPipeClient.cs
@@ -107,7 +107,7 @@ private void OnExceptionOccurred(Exception exception)
/// Name of the server's pipe
/// the Name of the server, default is local machine
/// Default reconnection interval -
- /// Default formatter -
+ /// Default formatter -
public SingleConnectionPipeClient(string pipeName, string serverName = ".", TimeSpan? reconnectionInterval = default, IFormatter? formatter = default)
{
PipeName = pipeName;
@@ -141,7 +141,7 @@ public SingleConnectionPipeClient(string pipeName, string serverName = ".", Time
}
};
- Formatter = formatter ?? new BinaryFormatter();
+ Formatter = formatter ?? new DefaultFormatter();
}
#endregion
diff --git a/src/libs/H.Pipes/SingleConnectionPipeServer.cs b/src/libs/H.Pipes/SingleConnectionPipeServer.cs
index 0fef4ee..0a47e2d 100644
--- a/src/libs/H.Pipes/SingleConnectionPipeServer.cs
+++ b/src/libs/H.Pipes/SingleConnectionPipeServer.cs
@@ -106,11 +106,11 @@ private void OnExceptionOccurred(Exception exception)
/// Constructs a new NamedPipeServer object that listens for client connections on the given .
///
/// Name of the pipe to listen on
- /// Default formatter -
+ /// Default formatter -
public SingleConnectionPipeServer(string pipeName, IFormatter? formatter = default)
{
PipeName = pipeName;
- Formatter = formatter ?? new BinaryFormatter();
+ Formatter = formatter ?? new DefaultFormatter();
}
#endregion
diff --git a/src/tests/Directory.Build.props b/src/tests/Directory.Build.props
index cc1e0df..1932e05 100644
--- a/src/tests/Directory.Build.props
+++ b/src/tests/Directory.Build.props
@@ -2,9 +2,14 @@
-
+
+
+
+
+
+
diff --git a/src/tests/H.Pipes.Tests/BaseTests.cs b/src/tests/H.Pipes.Tests/BaseTests.cs
index 7cd0721..71530da 100644
--- a/src/tests/H.Pipes.Tests/BaseTests.cs
+++ b/src/tests/H.Pipes.Tests/BaseTests.cs
@@ -106,14 +106,14 @@ public static async Task DataTestAsync(List values, Func? hash
using var cancellationTokenSource = new CancellationTokenSource(timeout ?? TimeSpan.FromMinutes(1));
const string pipeName = "pipe";
- await using var server = new PipeServer(pipeName, formatter ?? new BinaryFormatter())
+ await using var server = new PipeServer(pipeName, formatter ?? new DefaultFormatter())
{
#if NET48
// https://github.com/HavenDV/H.Pipes/issues/6
WaitFreePipe = true,
#endif
};
- await using var client = new PipeClient(pipeName, formatter: formatter ?? new BinaryFormatter());
+ await using var client = new PipeClient(pipeName, formatter: formatter ?? new DefaultFormatter());
await DataTestAsync(server, client, values, hashFunc, cancellationTokenSource.Token);
}
@@ -123,11 +123,11 @@ public static async Task DataSingleTestAsync(List values, Func
using var cancellationTokenSource = new CancellationTokenSource(timeout ?? TimeSpan.FromMinutes(1));
const string pipeName = "pipe";
- await using var server = new SingleConnectionPipeServer(pipeName, formatter ?? new BinaryFormatter())
+ await using var server = new SingleConnectionPipeServer(pipeName, formatter ?? new DefaultFormatter())
{
WaitFreePipe = true
};
- await using var client = new SingleConnectionPipeClient(pipeName, formatter: formatter ?? new BinaryFormatter());
+ await using var client = new SingleConnectionPipeClient(pipeName, formatter: formatter ?? new DefaultFormatter());
await DataTestAsync(server, client, values, hashFunc, cancellationTokenSource.Token);
}
diff --git a/src/tests/H.Pipes.Tests/DataTests.cs b/src/tests/H.Pipes.Tests/DataTests.cs
index 1d36918..10182eb 100644
--- a/src/tests/H.Pipes.Tests/DataTests.cs
+++ b/src/tests/H.Pipes.Tests/DataTests.cs
@@ -161,7 +161,8 @@ public async Task Single_TestMessageSize1Kx3_SystemTextJson()
//{
// await BaseTests.BinaryDataSingleTestAsync(1025, 3, new CerasFormatter());
//}
-
+
+#if !NET8_0_OR_GREATER
[TestMethod]
public async Task TypeTest()
{
@@ -170,7 +171,7 @@ public async Task TypeTest()
using var registration = cancellationTokenSource.Token.Register(() => completionSource.TrySetCanceled());
const string pipeName = "pipe";
- var formatter = new BinaryFormatter();
+ var formatter = new DefaultFormatter();
await using var server = new PipeServer