You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/policies/msgraph-sdk-dotnet-core-branch-protection.yml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ configuration:
36
36
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
37
37
requiredStatusChecks:
38
38
- Build and Test # Contains CodeQL
39
+
- Validate Project for Trimming
39
40
- license/cla
40
41
# Require branches to be up to date before merging. boolean
Copy file name to clipboardExpand all lines: src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
+41-19Lines changed: 41 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,17 @@ namespace Microsoft.Graph
6
6
{
7
7
usingSystem;
8
8
usingSystem.Collections.Generic;
9
+
usingSystem.ComponentModel;
9
10
usingSystem.IO;
10
11
usingSystem.Net.Http;
12
+
usingSystem.Text.Json;
11
13
usingSystem.Threading;
12
14
usingSystem.Threading.Tasks;
13
15
usingMicrosoft.Graph.Core.Models;
14
16
usingMicrosoft.Kiota.Abstractions;
15
17
usingMicrosoft.Kiota.Abstractions.Authentication;
16
18
usingMicrosoft.Kiota.Abstractions.Serialization;
19
+
usingMicrosoft.Kiota.Serialization.Json;
17
20
18
21
/// <summary>
19
22
/// Task to help with resumable large file uploads.
@@ -40,7 +43,23 @@ private IUploadSession Session
40
43
/// <param name="maxSliceSize">Max size(in bytes) of each slice to be uploaded. Defaults to 5MB. When uploading to OneDrive or SharePoint, this value needs to be a multiple of 320 KiB (327,680 bytes).
41
44
/// If less than 0, default value of 5 MiB is used.</param>
42
45
/// <param name="requestAdapter"><see cref="IRequestAdapter"/> to use for making upload requests. The client should not set Auth headers as upload urls do not need them.</param>
/// Task to help with resumable large file uploads. Generates slices based on <paramref name="uploadSession"/>
55
+
/// information, and can control uploading of requests.
56
+
/// </summary>
57
+
/// <param name="uploadSession">Session information of type <see cref="IUploadSession"/>></param>
58
+
/// <param name="uploadStream">Readable, seekable stream to be uploaded. Length of session is determined via uploadStream.Length</param>
59
+
/// <param name="maxSliceSize">Max size(in bytes) of each slice to be uploaded. Defaults to 5MB. When uploading to OneDrive or SharePoint, this value needs to be a multiple of 320 KiB (327,680 bytes).
60
+
/// If less than 0, default value of 5 MiB is used.</param>
61
+
/// <param name="requestAdapter"><see cref="IRequestAdapter"/> to use for making upload requests. The client should not set Auth headers as upload urls do not need them.</param>
// this scenario (unlikely) will occur in the event the model in the service libraries hasn't been updated to implement the IUploadSession interface from core.
thrownewTaskCanceledException("Upload failed too many times. See InnerException for list of exceptions that occured.",newAggregateException(trackedExceptions.ToArray()));
@@ -292,7 +314,7 @@ private long NextSliceSize(long rangeBegin, long rangeEnd)
thrownewOperationCanceledException("File upload cancelled. See InnerException for list of exceptions that occured.",newAggregateException(trackedExceptions));
returnparsableCollection.GetType().GetProperty("Value")?.GetValue(parsableCollection,null)asList<TEntity>??thrownewArgumentException("The Parsable does not contain a collection property");
374
+
returntypeof(TCollectionPage).GetProperty("Value")?.GetValue(parsableCollection,null)asList<TEntity>??thrownewArgumentException("The Parsable does not contain a collection property");
0 commit comments