From 63e90cbbe15013a597d2bd499ed978270eb38cb4 Mon Sep 17 00:00:00 2001 From: Florian Bernd Date: Wed, 16 Oct 2024 13:26:06 +0200 Subject: [PATCH] Remove `MemoryStreamFactory` default value from `Serialize` extensions (#125) This removes an ambiguity in the extension method signatures. --- .../Serialization/TransportSerializerExtensions.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Elastic.Transport/Components/Serialization/TransportSerializerExtensions.cs b/src/Elastic.Transport/Components/Serialization/TransportSerializerExtensions.cs index 79e189d..66a00e3 100644 --- a/src/Elastic.Transport/Components/Serialization/TransportSerializerExtensions.cs +++ b/src/Elastic.Transport/Components/Serialization/TransportSerializerExtensions.cs @@ -43,7 +43,7 @@ public static byte[] SerializeToBytes( public static byte[] SerializeToBytes( this Serializer serializer, T? data, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None ) { @@ -82,7 +82,7 @@ public static byte[] SerializeToBytes( this Serializer serializer, object? data, Type type, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None ) { @@ -119,7 +119,7 @@ public static string SerializeToString( public static string SerializeToString( this Serializer serializer, T? data, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None ) { @@ -167,7 +167,7 @@ public static string SerializeToString( this Serializer serializer, object? data, Type type, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None ) { @@ -219,7 +219,7 @@ public static void Serialize( this Serializer serializer, T? data, Utf8JsonWriter writer, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None) { if (serializer is SystemTextJsonSerializer stjSerializer) @@ -279,7 +279,7 @@ public static void Serialize( object? data, Type type, Utf8JsonWriter writer, - MemoryStreamFactory? memoryStreamFactory = null, + MemoryStreamFactory? memoryStreamFactory, SerializationFormatting formatting = SerializationFormatting.None) { if (serializer is SystemTextJsonSerializer stjSerializer)