Skip to content

Commit 34c4cb5

Browse files
authored
initial commit (#46375)
1 parent f45a34e commit 34c4cb5

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Globalization;
77
using System.Threading;
88
using System.Threading.Tasks;
9+
using Azure.Storage.Common;
910

1011
namespace Azure.Storage.DataMovement
1112
{
@@ -140,6 +141,9 @@ public static async Task<ServiceToServiceJobPart> CreateJobPartAsync(
140141
StorageResourceItem destinationResource,
141142
long? length = default)
142143
{
144+
Argument.AssertNotNull(sourceResource, nameof(sourceResource));
145+
Argument.AssertNotNull(destinationResource, nameof(destinationResource));
146+
143147
// Create Job Part file as we're initializing the job part
144148
ServiceToServiceJobPart part = new ServiceToServiceJobPart(
145149
job: job,

sdk/storage/Azure.Storage.DataMovement/src/StreamToUriJobPart.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Buffers;
1010
using Azure.Storage.Shared;
1111
using Azure.Core;
12+
using Azure.Storage.Common;
1213

1314
namespace Azure.Storage.DataMovement
1415
{
@@ -140,6 +141,9 @@ public static async Task<StreamToUriJobPart> CreateJobPartAsync(
140141
StorageResourceItem destinationResource,
141142
long? length = default)
142143
{
144+
Argument.AssertNotNull(sourceResource, nameof(sourceResource));
145+
Argument.AssertNotNull(destinationResource, nameof(destinationResource));
146+
143147
// Create Job Part file as we're initializing the job part
144148
StreamToUriJobPart part = new StreamToUriJobPart(
145149
job: job,

sdk/storage/Azure.Storage.DataMovement/src/UriToStreamJobPart.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.IO;
88
using System.Threading;
99
using Azure.Core;
10+
using Azure.Storage.Common;
1011

1112
namespace Azure.Storage.DataMovement
1213
{
@@ -142,6 +143,9 @@ public static async Task<UriToStreamJobPart> CreateJobPartAsync(
142143
StorageResourceItem destinationResource,
143144
long? length = default)
144145
{
146+
Argument.AssertNotNull(sourceResource, nameof(sourceResource));
147+
Argument.AssertNotNull(destinationResource, nameof(destinationResource));
148+
145149
// Create Job Part file as we're initializing the job part
146150
UriToStreamJobPart part = new UriToStreamJobPart(
147151
job: job,

0 commit comments

Comments
 (0)