Skip to content

Commit

Permalink
pr review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Aug 30, 2024
1 parent 4b47b57 commit e326ed5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ internal static IUploadSession ExtractSessionFromParsable(IParsable uploadSessio
throw new ArgumentException("The Parsable does not contain the 'uploadUrl' property");

// convert to local type as we don't have the type info for the upload session just that it implements IParsable
var uploadSessionStream = KiotaSerializer.SerializeAsStream(CoreConstants.MimeTypeNames.Application.Json, uploadSession, false);// just in case there's a backing store
using var uploadSessionStream = KiotaSerializer.SerializeAsStream(CoreConstants.MimeTypeNames.Application.Json, uploadSession, false);// just in case there's a backing store
var uploadSessionJsonNode = new JsonParseNode(JsonDocument.Parse(uploadSessionStream).RootElement);
return uploadSessionJsonNode.GetObjectValue(UploadSession.CreateFromDiscriminatorValue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public LargeFileUploadTests()
{
// register the default serialization instance as the generator would.
ParseNodeFactoryRegistry.DefaultInstance.ContentTypeAssociatedFactories.TryAdd(CoreConstants.MimeTypeNames.Application.Json, new JsonParseNodeFactory());
SerializationWriterFactoryRegistry.DefaultInstance.ContentTypeAssociatedFactories.TryAdd(CoreConstants.MimeTypeNames.Application.Json, new JsonSerializationWriterFactory());
}

[Fact]
Expand Down

0 comments on commit e326ed5

Please sign in to comment.