Update project references and solution entries to use `PipeClient` and `PipeServer`, and launch the renamed `PipeServer.exe` or `PipeServer.dll`.
17 lines
544 B
C#
17 lines
544 B
C#
using PipeMethodCalls;
|
|
using System.Text.Json;
|
|
|
|
namespace PipeShared;
|
|
|
|
/// <summary>
|
|
/// JSON serializer that also includes public fields (required for System.Numerics.Vector3).
|
|
/// </summary>
|
|
public class JsonFieldsPipeSerializer : IPipeSerializer
|
|
{
|
|
private static readonly JsonSerializerOptions Options = new() { IncludeFields = true };
|
|
|
|
public object Deserialize(byte[] data, Type type) => JsonSerializer.Deserialize(data, type, Options)!;
|
|
|
|
public byte[] Serialize(object o) => JsonSerializer.SerializeToUtf8Bytes(o, Options);
|
|
}
|