diff --git a/src/abstractions/serialization/KiotaSerializer.Deserialization.NonGeneric.cs b/src/abstractions/serialization/KiotaSerializer.Deserialization.NonGeneric.cs index 20bc4af..4602f79 100644 --- a/src/abstractions/serialization/KiotaSerializer.Deserialization.NonGeneric.cs +++ b/src/abstractions/serialization/KiotaSerializer.Deserialization.NonGeneric.cs @@ -23,10 +23,10 @@ namespace Microsoft.Kiota.Abstractions.Serialization; internal interface IKiotaDeserializationWrapper { - Task DeserializeAsync(string contentType, Stream stream, CancellationToken cancellationToken = default); - Task DeserializeAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken = default); - Task> DeserializeCollectionAsync(string contentType, Stream stream, CancellationToken cancellationToken = default); - Task> DeserializeCollectionAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken = default); + Task DeserializeAsync(string contentType, Stream stream, CancellationToken cancellationToken); + Task DeserializeAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken); + Task> DeserializeCollectionAsync(string contentType, Stream stream, CancellationToken cancellationToken); + Task> DeserializeCollectionAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken); } #if NET5_0_OR_GREATER internal class KiotaDeserializationWrapper<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T> : IKiotaDeserializationWrapper where T : IParsable @@ -34,10 +34,10 @@ internal class KiotaDeserializationWrapper<[DynamicallyAccessedMembers(Dynamical internal class KiotaDeserializationWrapper : IKiotaDeserializationWrapper where T : IParsable #endif { - public async Task DeserializeAsync(string contentType, Stream stream, CancellationToken cancellationToken = default) => await KiotaSerializer.DeserializeAsync(contentType, stream, cancellationToken).ConfigureAwait(false); - public async Task DeserializeAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken = default) => await KiotaSerializer.DeserializeAsync(contentType, serializedRepresentation, cancellationToken).ConfigureAwait(false); - public async Task> DeserializeCollectionAsync(string contentType, Stream stream, CancellationToken cancellationToken = default) => (await KiotaSerializer.DeserializeCollectionAsync(contentType, stream, cancellationToken).ConfigureAwait(false)).OfType(); - public async Task> DeserializeCollectionAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken = default) => (await KiotaSerializer.DeserializeCollectionAsync(contentType, serializedRepresentation, cancellationToken).ConfigureAwait(false)).OfType(); + public async Task DeserializeAsync(string contentType, Stream stream, CancellationToken cancellationToken) => await KiotaSerializer.DeserializeAsync(contentType, stream, cancellationToken).ConfigureAwait(false); + public async Task DeserializeAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken) => await KiotaSerializer.DeserializeAsync(contentType, serializedRepresentation, cancellationToken).ConfigureAwait(false); + public async Task> DeserializeCollectionAsync(string contentType, Stream stream, CancellationToken cancellationToken) => (await KiotaSerializer.DeserializeCollectionAsync(contentType, stream, cancellationToken).ConfigureAwait(false)).OfType(); + public async Task> DeserializeCollectionAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken) => (await KiotaSerializer.DeserializeCollectionAsync(contentType, serializedRepresentation, cancellationToken).ConfigureAwait(false)).OfType(); } static internal class KiotaDeserializationWrapperFactory {