Turn on the AOT analyzer. (#92)

* Turn on the AOT analyzer.

* Address feedback

* Add missing types.

* Fix build and react to conflicts.

* Fix failing test.

* Address feedback.
This commit is contained in:
Eirik Tsarpalis 2025-03-18 18:48:28 +02:00 • committed by GitHub
commit e7fa6194f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -134,7 +134,7 @@ public sealed class StdioClientTransport : TransportBase, IClientTransport
try
{
var json = JsonSerializer.Serialize(message, _jsonOptions);
var json = JsonSerializer.Serialize(message, _jsonOptions.GetTypeInfo<IJsonRpcMessage>());
_logger.TransportSendingMessage(EndpointName, id, json);
// Write the message followed by a newline
@ -206,7 +206,7 @@ public sealed class StdioClientTransport : TransportBase, IClientTransport
try
{
line=line.Trim();//Fixes an error when the service prefixes nonprintable characters
var message = JsonSerializer.Deserialize<IJsonRpcMessage>(line, _jsonOptions);
var message = JsonSerializer.Deserialize(line, _jsonOptions.GetTypeInfo<IJsonRpcMessage>());
if (message != null)
{
string messageId = "(no id)";