Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Oct 15, 2024
1 parent a7f3dbe commit 62c6b0e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.\
// ------------------------------------------------------------------------------

using System.Threading.Tasks;
using System.Threading;
using System.IO;
using System;

using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;

#if NET5_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
Expand All @@ -29,7 +28,7 @@ public static partial class KiotaJsonSerializer
#if NET5_0_OR_GREATER
public static Task<IParsable?> DeserializeAsync([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] Type targetType, string serializedRepresentation, CancellationToken cancellationToken = default)
#else
public static Task<IParsable?> DeserializeAsync(Type targetType, string serializedRepresentation , CancellationToken cancellationToken = default)
public static Task<IParsable?> DeserializeAsync(Type targetType, string serializedRepresentation, CancellationToken cancellationToken = default)
#endif
=> KiotaSerializer.KiotaDeserializationWrapperFactory.Create(targetType).DeserializeAsync(_jsonContentType, serializedRepresentation, cancellationToken);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@



using System.Threading.Tasks;
using System.Threading;
using System.IO;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;



Expand Down Expand Up @@ -62,7 +62,7 @@ internal class KiotaDeserializationWrapper<[DynamicallyAccessedMembers(Dynamical
#else
internal class KiotaDeserializationWrapper<T> : IKiotaDeserializationWrapper where T : IParsable
#endif
{
{
public async Task<IParsable?> DeserializeAsync(string contentType, Stream stream, CancellationToken cancellationToken = default) => await KiotaSerializer.DeserializeAsync<T>(contentType, stream, cancellationToken);
public async Task<IParsable?> DeserializeAsync(string contentType, string serializedRepresentation, CancellationToken cancellationToken = default) => await KiotaSerializer.DeserializeAsync<T>(contentType, serializedRepresentation, cancellationToken);
public async Task<IEnumerable<IParsable>> DeserializeCollectionAsync(string contentType, Stream stream, CancellationToken cancellationToken = default) => (await KiotaSerializer.DeserializeCollectionAsync<T>(contentType, stream, cancellationToken)).OfType<IParsable>();
Expand Down

0 comments on commit 62c6b0e

Please sign in to comment.