diff --git a/.gitignore b/.gitignore
index a1614a183..be4001bfc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -118,6 +118,9 @@ Test/Common/TestConfigurations.xml
# Test Results
TestResults/
+# Test Config
+Test/Common/TestConfigurations.xml
+
# Mac development
.DS_Store
diff --git a/BreakingChanges.txt b/BreakingChanges.txt
index 2bb731861..797991552 100644
--- a/BreakingChanges.txt
+++ b/BreakingChanges.txt
@@ -1,7 +1,29 @@
Tracking Breaking Changes since 6.0
+- All: Support for 2015-07-08 REST version. Please see our REST API documentation and blogs for information about the related added features. If you are using the Storage Emulator, please update to Emulator version 4.3.
+- All (WinRT): All apis now return Task objects instead of IAsync* objects. Please see our blog post for more info.
- All: TestConfigurations.xml has been deleted and added to the .gitignore file to keep users from accidentally leaking their credentials. To continue running tests, simply add the same file back after you get the latest code.
+- All: Virtualized all service call APIs and unsealed their classes.
+- All: Updated the UserAgent string to match the Azure Storage standard.
- All: The dnx and net target frameworks have been unified, and DNXCore target framework has been renamed to Dotnet5.4. All DNX4.5.1 projects will take a dependency on the regular Windows Desktop dll.
+- All: Windows Runtime no longer uses WrappedStorageExceptions or HResults. Catch StorageException and check HTTP status code instead.
+- All: SetServiceProperties APIs no longer instantiates Logging, HourMetrics, MinuteMetrics, or Cors instance variables. New LoggingProperties, MetricsProperties, and CorsProperties objects will need to be set for those variables before they can be assigned.
+- All: LoggingProperties and MetricsProperties Version now defaults to "1.0" or Constants.AnalyticsConstants.MetricsVersionV1 or LoggingVersionV1.
+- All: Removed deprecated SharedKeyLiteAuthenticationHandler, use SharedKeyAuthenticationHandler instead.
+- All: Removed deprecated request options setters on the *Client class object in favor of setting request options on Client's DefaultRequestOptions object.
+- All: When creating a SAS token with a non-null SharedAccessProtocol, only valid enum values are permitted. All other values will now throw an ArgumentException.
+- Blobs: Removed deprecated (Begin/End)StartCopyFromBlob(Async) APIs in favor of using (Begin/End)StartCopy(Async) APIs.
+- Blobs: Removed deprecated GetSubdirectoryReference API in favor of GetDirectoryReference.
+- Blobs: Removed FileMode parameter for UploadFromFile* and AppendFromFile* APIs since there is only 1 valid option (FileMode.Open).
+- Blobs: When downloading blob to local file fails, file created for download will be cleaned up.
+- Blobs: proposedLeaseId for minimum AcquireLease API overloads defaults to null.
+- Tables: Removed deprecated AtomPub payloadFormat support.
+- Tables: Fixed a bug in table batch where storage exceptions resulted in operation contexts with incorrect HttpStatusMessage.
+- Tables: Batching validation was added for batch sizes exceeding 100 operations.
+- Tables: Batching validation was added for null partition keys and row keys.
+- Tables: Removed deprecated overloads for Table.Retrieve APIs.
+- Files: When downloading file to local system file fails, file created for download will be cleaned up.
+- Queues: Removed deprecated EndBeginClear API in favor of EndClear.
Tracking Breaking Changes since 5.0
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2f47fde3d..f73f212e3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,7 +3,7 @@ If you intend to contribute to the project, please make sure you've followed the
The Azure Storage development team uses Visual Studio so instructions will be tailored to that preference. However, any preferred IDE or other toolset should be usable.
### Install
-* .Net 4.5.1
+* .Net 4.0
* Visual Studio 2013. If you want to work with the CoreCLR SDK, you will need Visual Studio 2015. Note not all of the non-CoreCLR SDKs work in VS 2015, so you may need to develop with both 2013 and 2015 if you take a dependency on multiple runtimes.
* [StyleCop](http://stylecop.codeplex.com/) checks your code’s style – spacing, comments, etc. You can run this from the Tools menu in Visual Studio or by right clicking the project/folder you’d like to run it on.
* Clone the source code from GitHub.
diff --git a/Lib/ClassLibraryCommon/Blob/CloudAppendBlob.cs b/Lib/ClassLibraryCommon/Blob/CloudAppendBlob.cs
index c3cf8f186..7e3def7ae 100644
--- a/Lib/ClassLibraryCommon/Blob/CloudAppendBlob.cs
+++ b/Lib/ClassLibraryCommon/Blob/CloudAppendBlob.cs
@@ -37,7 +37,7 @@ namespace Microsoft.WindowsAzure.Storage.Blob
///
/// Represents an append blob, a type of blob where blocks of data are always committed to the end of the blob.
///
- public sealed partial class CloudAppendBlob : CloudBlob, ICloudBlob
+ public partial class CloudAppendBlob : CloudBlob, ICloudBlob
{
#if SYNC
///
@@ -55,7 +55,7 @@ public sealed partial class CloudAppendBlob : CloudBlob, ICloudBlob
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public CloudBlobStream OpenWrite(bool createNew, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual CloudBlobStream OpenWrite(bool createNew, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, this.BlobType, this.ServiceClient, false);
@@ -123,7 +123,7 @@ public CloudBlobStream OpenWrite(bool createNew, AccessCondition accessCondition
/// ranging from between 16 KB and 4 MB inclusive.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginOpenWrite(bool createNew, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AsyncCallback callback, object state)
{
return this.BeginOpenWrite(createNew, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -146,7 +146,7 @@ public ICancellableAsyncResult BeginOpenWrite(bool createNew, AsyncCallback call
///
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Needed to ensure exceptions are not thrown on threadpool threads.")]
[DoesServiceRequest]
- public ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, this.BlobType, this.ServiceClient, false);
@@ -255,7 +255,7 @@ public ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCondition ac
///
/// An that references the pending asynchronous operation.
/// A object.
- public CloudBlobStream EndOpenWrite(IAsyncResult asyncResult)
+ public virtual CloudBlobStream EndOpenWrite(IAsyncResult asyncResult)
{
StorageAsyncResult storageAsyncResult = (StorageAsyncResult)asyncResult;
storageAsyncResult.End();
@@ -274,7 +274,7 @@ public CloudBlobStream EndOpenWrite(IAsyncResult asyncResult)
/// ranging from between 16 KB and 4 MB inclusive.
///
[DoesServiceRequest]
- public Task OpenWriteAsync(bool createNew)
+ public virtual Task OpenWriteAsync(bool createNew)
{
return this.OpenWriteAsync(createNew, CancellationToken.None);
}
@@ -291,7 +291,7 @@ public Task OpenWriteAsync(bool createNew)
/// ranging from between 16 KB and 4 MB inclusive.
///
[DoesServiceRequest]
- public Task OpenWriteAsync(bool createNew, CancellationToken cancellationToken)
+ public virtual Task OpenWriteAsync(bool createNew, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginOpenWrite, this.EndOpenWrite, createNew, cancellationToken);
}
@@ -311,7 +311,7 @@ public Task OpenWriteAsync(bool createNew, CancellationToken ca
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.OpenWriteAsync(createNew, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -332,7 +332,7 @@ public Task OpenWriteAsync(bool createNew, AccessCondition acce
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginOpenWrite, this.EndOpenWrite, createNew, accessCondition, options, operationContext, cancellationToken);
}
@@ -352,7 +352,7 @@ public Task OpenWriteAsync(bool createNew, AccessCondition acce
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.UploadFromStreamHelper(source, null /* length */, true /* createNew */, accessCondition, options, operationContext);
}
@@ -371,7 +371,7 @@ public void UploadFromStream(Stream source, AccessCondition accessCondition = nu
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.UploadFromStreamHelper(source, length, true /* createNew */, accessCondition, options, operationContext);
}
@@ -388,7 +388,7 @@ public void UploadFromStream(Stream source, long length, AccessCondition accessC
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public void AppendFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AppendFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.UploadFromStreamHelper(source, null /* length */, false /* createNew */, accessCondition, options, operationContext);
}
@@ -406,7 +406,7 @@ public void AppendFromStream(Stream source, AccessCondition accessCondition = nu
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public void AppendFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AppendFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.UploadFromStreamHelper(source, length, false /* createNew */, accessCondition, options, operationContext);
}
@@ -462,7 +462,7 @@ internal void UploadFromStreamHelper(Stream source, long? length, bool createNew
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, null /* length */, true /* createNew */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -483,7 +483,7 @@ public ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallbac
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, null /* length */, true /* createNew */, accessCondition, options, operationContext, callback, state);
}
@@ -502,7 +502,7 @@ public ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondit
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, length, true /* createNew */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -524,7 +524,7 @@ public ICancellableAsyncResult BeginUploadFromStream(Stream source, long length,
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, length, true /* createNew */, accessCondition, options, operationContext, callback, state);
}
@@ -540,7 +540,7 @@ public ICancellableAsyncResult BeginUploadFromStream(Stream source, long length,
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromStream(Stream source, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, null /* length */, false /* createNew */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -560,7 +560,7 @@ public ICancellableAsyncResult BeginAppendFromStream(Stream source, AsyncCallbac
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, null /* length */, false /* createNew */, accessCondition, options, operationContext, callback, state);
}
@@ -577,7 +577,7 @@ public ICancellableAsyncResult BeginAppendFromStream(Stream source, AccessCondit
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, length, false /* createNew */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -598,7 +598,7 @@ public ICancellableAsyncResult BeginAppendFromStream(Stream source, long length,
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginUploadFromStreamHelper(source, length, false /* createNew */, accessCondition, options, operationContext, callback, state);
}
@@ -722,7 +722,7 @@ internal ICancellableAsyncResult BeginUploadFromStreamHelper(Stream source, long
/// Ends an asynchronous operation to upload a stream to an append blob.
///
/// An that references the pending asynchronous operation.
- public void EndUploadFromStream(IAsyncResult asyncResult)
+ public virtual void EndUploadFromStream(IAsyncResult asyncResult)
{
StorageAsyncResult storageAsyncResult = (StorageAsyncResult)asyncResult;
storageAsyncResult.End();
@@ -732,7 +732,7 @@ public void EndUploadFromStream(IAsyncResult asyncResult)
/// Ends an asynchronous operation to append a stream to an append blob.
///
/// An that references the pending asynchronous operation.
- public void EndAppendFromStream(IAsyncResult asyncResult)
+ public virtual void EndAppendFromStream(IAsyncResult asyncResult)
{
StorageAsyncResult storageAsyncResult = (StorageAsyncResult)asyncResult;
storageAsyncResult.End();
@@ -748,7 +748,7 @@ public void EndAppendFromStream(IAsyncResult asyncResult)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source)
+ public virtual Task UploadFromStreamAsync(Stream source)
{
return this.UploadFromStreamAsync(source, CancellationToken.None);
}
@@ -763,7 +763,7 @@ public Task UploadFromStreamAsync(Stream source)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, CancellationToken cancellationToken)
+ public virtual Task UploadFromStreamAsync(Stream source, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromStream, this.EndUploadFromStream, source, cancellationToken);
}
@@ -782,7 +782,7 @@ public Task UploadFromStreamAsync(Stream source, CancellationToken cancellationT
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.UploadFromStreamAsync(source, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -802,7 +802,7 @@ public Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromStream, this.EndUploadFromStream, source, accessCondition, options, operationContext, cancellationToken);
}
@@ -817,7 +817,7 @@ public Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, long length)
+ public virtual Task UploadFromStreamAsync(Stream source, long length)
{
return this.UploadFromStreamAsync(source, length, CancellationToken.None);
}
@@ -833,7 +833,7 @@ public Task UploadFromStreamAsync(Stream source, long length)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
+ public virtual Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromStream, this.EndUploadFromStream, source, length, cancellationToken);
}
@@ -853,7 +853,7 @@ public Task UploadFromStreamAsync(Stream source, long length, CancellationToken
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.UploadFromStreamAsync(source, length, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -874,7 +874,7 @@ public Task UploadFromStreamAsync(Stream source, long length, AccessCondition ac
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromStream, this.EndUploadFromStream, source, length, accessCondition, options, operationContext, cancellationToken);
}
@@ -888,7 +888,7 @@ public Task UploadFromStreamAsync(Stream source, long length, AccessCondition ac
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source)
+ public virtual Task AppendFromStreamAsync(Stream source)
{
return this.AppendFromStreamAsync(source, CancellationToken.None);
}
@@ -903,7 +903,7 @@ public Task AppendFromStreamAsync(Stream source)
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, CancellationToken cancellationToken)
+ public virtual Task AppendFromStreamAsync(Stream source, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromStream, this.EndAppendFromStream, source, cancellationToken);
}
@@ -921,7 +921,7 @@ public Task AppendFromStreamAsync(Stream source, CancellationToken cancellationT
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AppendFromStreamAsync(source, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -940,7 +940,7 @@ public Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromStream, this.EndAppendFromStream, source, accessCondition, options, operationContext, cancellationToken);
}
@@ -955,7 +955,7 @@ public Task AppendFromStreamAsync(Stream source, AccessCondition accessCondition
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, long length)
+ public virtual Task AppendFromStreamAsync(Stream source, long length)
{
return this.AppendFromStreamAsync(source, length, CancellationToken.None);
}
@@ -971,7 +971,7 @@ public Task AppendFromStreamAsync(Stream source, long length)
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
+ public virtual Task AppendFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromStream, this.EndAppendFromStream, source, length, cancellationToken);
}
@@ -990,7 +990,7 @@ public Task AppendFromStreamAsync(Stream source, long length, CancellationToken
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AppendFromStreamAsync(source, length, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1010,7 +1010,7 @@ public Task AppendFromStreamAsync(Stream source, long length, AccessCondition ac
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromStream, this.EndAppendFromStream, source, length, accessCondition, options, operationContext, cancellationToken);
}
@@ -1021,7 +1021,6 @@ public Task AppendFromStreamAsync(Stream source, long length, AccessCondition ac
/// Uploads a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
@@ -1031,11 +1030,11 @@ public Task AppendFromStreamAsync(Stream source, long length, AccessCondition ac
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public void UploadFromFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void UploadFromFile(string path, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("path", path);
- using (FileStream fileStream = new FileStream(path, mode, FileAccess.Read))
+ using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
this.UploadFromStream(fileStream, accessCondition, options, operationContext);
}
@@ -1045,7 +1044,6 @@ public void UploadFromFile(string path, FileMode mode, AccessCondition accessCon
/// Appends a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
@@ -1054,11 +1052,11 @@ public void UploadFromFile(string path, FileMode mode, AccessCondition accessCon
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public void AppendFromFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AppendFromFile(string path, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("path", path);
- using (FileStream fileStream = new FileStream(path, mode, FileAccess.Read))
+ using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
{
this.AppendFromStream(fileStream, accessCondition, options, operationContext);
}
@@ -1069,26 +1067,24 @@ public void AppendFromFile(string path, FileMode mode, AccessCondition accessCon
/// Begins an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An delegate that will receive notification when the asynchronous operation completes.
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromFile(string path, FileMode mode, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)
{
- return this.BeginUploadFromFile(path, mode, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
+ return this.BeginUploadFromFile(path, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
///
/// Begins an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1098,14 +1094,14 @@ public ICancellableAsyncResult BeginUploadFromFile(string path, FileMode mode, A
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("path", path);
- FileStream fileStream = new FileStream(path, mode, FileAccess.Read);
+ FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
StorageAsyncResult storageAsyncResult = new StorageAsyncResult(callback, state)
{
OperationState = fileStream
@@ -1128,7 +1124,6 @@ public ICancellableAsyncResult BeginUploadFromFile(string path, FileMode mode, A
/// Begins an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An delegate that will receive notification when the asynchronous operation completes.
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
@@ -1137,16 +1132,15 @@ public ICancellableAsyncResult BeginUploadFromFile(string path, FileMode mode, A
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromFile(string path, FileMode mode, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromFile(string path, AsyncCallback callback, object state)
{
- return this.BeginAppendFromFile(path, mode, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
+ return this.BeginAppendFromFile(path, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
///
/// Begins an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1158,11 +1152,11 @@ public ICancellableAsyncResult BeginAppendFromFile(string path, FileMode mode, A
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("path", path);
- FileStream fileStream = new FileStream(path, mode, FileAccess.Read);
+ FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);
StorageAsyncResult storageAsyncResult = new StorageAsyncResult(callback, state)
{
OperationState = fileStream
@@ -1221,7 +1215,7 @@ private void UploadFromFileCallback(IAsyncResult asyncResult)
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
- public void EndUploadFromFile(IAsyncResult asyncResult)
+ public virtual void EndUploadFromFile(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -1234,7 +1228,7 @@ public void EndUploadFromFile(IAsyncResult asyncResult)
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
- public void EndAppendFromFile(IAsyncResult asyncResult)
+ public virtual void EndAppendFromFile(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -1245,40 +1239,37 @@ public void EndAppendFromFile(IAsyncResult asyncResult)
/// Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// A object that represents the asynchronous operation.
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromFileAsync(string path, FileMode mode)
+ public virtual Task UploadFromFileAsync(string path)
{
- return this.UploadFromFileAsync(path, mode, CancellationToken.None);
+ return this.UploadFromFileAsync(path, CancellationToken.None);
}
///
/// Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
+ public virtual Task UploadFromFileAsync(string path, CancellationToken cancellationToken)
{
- return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromFile, this.EndUploadFromFile, path, mode, cancellationToken);
+ return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromFile, this.EndUploadFromFile, path, cancellationToken);
}
///
/// Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1286,19 +1277,18 @@ public Task UploadFromFileAsync(string path, FileMode mode, CancellationToken ca
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
- return this.UploadFromFileAsync(path, mode, accessCondition, options, operationContext, CancellationToken.None);
+ return this.UploadFromFileAsync(path, accessCondition, options, operationContext, CancellationToken.None);
}
///
/// Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1307,50 +1297,47 @@ public Task UploadFromFileAsync(string path, FileMode mode, AccessCondition acce
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
- /// To append data to an append blob that already exists, see .
+ /// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
- return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromFile, this.EndUploadFromFile, path, mode, accessCondition, options, operationContext, cancellationToken);
+ return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromFile, this.EndUploadFromFile, path, accessCondition, options, operationContext, cancellationToken);
}
///
/// Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// A object that represents the asynchronous operation.
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromFileAsync(string path, FileMode mode)
+ public virtual Task AppendFromFileAsync(string path)
{
- return this.AppendFromFileAsync(path, mode, CancellationToken.None);
+ return this.AppendFromFileAsync(path, CancellationToken.None);
}
///
/// Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
+ public virtual Task AppendFromFileAsync(string path, CancellationToken cancellationToken)
{
- return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromFile, this.EndAppendFromFile, path, mode, cancellationToken);
+ return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromFile, this.EndAppendFromFile, path, cancellationToken);
}
///
/// Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1360,16 +1347,15 @@ public Task AppendFromFileAsync(string path, FileMode mode, CancellationToken ca
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
- return this.AppendFromFileAsync(path, mode, accessCondition, options, operationContext, CancellationToken.None);
+ return this.AppendFromFileAsync(path, accessCondition, options, operationContext, CancellationToken.None);
}
///
/// Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
///
/// A string containing the file path providing the blob content.
- /// A enumeration value that specifies how to open the file.
/// An object that represents the condition that must be met in order for the request to proceed.
/// A object that specifies additional options for the request.
/// An object that represents the context for the current operation.
@@ -1380,9 +1366,9 @@ public Task AppendFromFileAsync(string path, FileMode mode, AccessCondition acce
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
- return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromFile, this.EndAppendFromFile, path, mode, accessCondition, options, operationContext, cancellationToken);
+ return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromFile, this.EndAppendFromFile, path, accessCondition, options, operationContext, cancellationToken);
}
#endif
@@ -1402,7 +1388,7 @@ public Task AppendFromFileAsync(string path, FileMode mode, AccessCondition acce
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("buffer", buffer);
@@ -1426,7 +1412,7 @@ public void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondi
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public void AppendFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AppendFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("buffer", buffer);
@@ -1451,7 +1437,7 @@ public void AppendFromByteArray(byte[] buffer, int index, int count, AccessCondi
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
{
return this.BeginUploadFromByteArray(buffer, index, count, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1474,7 +1460,7 @@ public ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("buffer", buffer);
@@ -1489,7 +1475,7 @@ public ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index
///
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
- public void EndUploadFromByteArray(IAsyncResult asyncResult)
+ public virtual void EndUploadFromByteArray(IAsyncResult asyncResult)
{
this.EndUploadFromStream(asyncResult);
}
@@ -1507,7 +1493,7 @@ public void EndUploadFromByteArray(IAsyncResult asyncResult)
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
{
return this.BeginAppendFromByteArray(buffer, index, count, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1529,7 +1515,7 @@ public ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("buffer", buffer);
@@ -1541,7 +1527,7 @@ public ICancellableAsyncResult BeginAppendFromByteArray(byte[] buffer, int index
/// Ends an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
///
/// An that references the pending asynchronous operation.
- public void EndAppendFromByteArray(IAsyncResult asyncResult)
+ public virtual void EndAppendFromByteArray(IAsyncResult asyncResult)
{
this.EndAppendFromStream(asyncResult);
}
@@ -1559,7 +1545,7 @@ public void EndAppendFromByteArray(IAsyncResult asyncResult)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)
+ public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)
{
return this.UploadFromByteArrayAsync(buffer, index, count, CancellationToken.None);
}
@@ -1577,7 +1563,7 @@ public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
+ public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromByteArray, this.EndUploadFromByteArray, buffer, index, count, cancellationToken);
}
@@ -1598,7 +1584,7 @@ public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, Cancel
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.UploadFromByteArrayAsync(buffer, index, count, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1620,7 +1606,7 @@ public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, Access
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadFromByteArray, this.EndUploadFromByteArray, buffer, index, count, accessCondition, options, operationContext, cancellationToken);
}
@@ -1636,7 +1622,7 @@ public Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, Access
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count)
+ public virtual Task AppendFromByteArrayAsync(byte[] buffer, int index, int count)
{
return this.AppendFromByteArrayAsync(buffer, index, count, CancellationToken.None);
}
@@ -1653,7 +1639,7 @@ public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count)
/// Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
///
[DoesServiceRequest]
- public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
+ public virtual Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromByteArray, this.EndAppendFromByteArray, buffer, index, count, cancellationToken);
}
@@ -1673,7 +1659,7 @@ public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, Cancel
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AppendFromByteArrayAsync(buffer, index, count, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1694,7 +1680,7 @@ public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, Access
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendFromByteArray, this.EndAppendFromByteArray, buffer, index, count, accessCondition, options, operationContext, cancellationToken);
}
@@ -1715,7 +1701,7 @@ public Task AppendFromByteArrayAsync(byte[] buffer, int index, int count, Access
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public void UploadText(string content, Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void UploadText(string content, Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("content", content);
@@ -1736,7 +1722,7 @@ public void UploadText(string content, Encoding encoding = null, AccessCondition
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public void AppendText(string content, Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AppendText(string content, Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("content", content);
@@ -1757,7 +1743,7 @@ public void AppendText(string content, Encoding encoding = null, AccessCondition
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadText(string content, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadText(string content, AsyncCallback callback, object state)
{
return this.BeginUploadText(content, null /* encoding */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1779,7 +1765,7 @@ public ICancellableAsyncResult BeginUploadText(string content, AsyncCallback cal
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginUploadText(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginUploadText(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("content", content);
@@ -1792,7 +1778,7 @@ public ICancellableAsyncResult BeginUploadText(string content, Encoding encoding
/// because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
///
/// An that references the pending asynchronous operation.
- public void EndUploadText(IAsyncResult asyncResult)
+ public virtual void EndUploadText(IAsyncResult asyncResult)
{
this.EndUploadFromByteArray(asyncResult);
}
@@ -1806,7 +1792,7 @@ public void EndUploadText(IAsyncResult asyncResult)
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendText(string content, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendText(string content, AsyncCallback callback, object state)
{
return this.BeginAppendText(content, null /* encoding */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1827,7 +1813,7 @@ public ICancellableAsyncResult BeginAppendText(string content, AsyncCallback cal
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendText(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendText(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("content", content);
@@ -1840,7 +1826,7 @@ public ICancellableAsyncResult BeginAppendText(string content, Encoding encoding
/// because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
///
/// An that references the pending asynchronous operation.
- public void EndAppendText(IAsyncResult asyncResult)
+ public virtual void EndAppendText(IAsyncResult asyncResult)
{
this.EndAppendFromByteArray(asyncResult);
}
@@ -1856,7 +1842,7 @@ public void EndAppendText(IAsyncResult asyncResult)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadTextAsync(string content)
+ public virtual Task UploadTextAsync(string content)
{
return this.UploadTextAsync(content, CancellationToken.None);
}
@@ -1873,7 +1859,7 @@ public Task UploadTextAsync(string content)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadTextAsync(string content, CancellationToken cancellationToken)
+ public virtual Task UploadTextAsync(string content, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadText, this.EndUploadText, content, cancellationToken);
}
@@ -1893,7 +1879,7 @@ public Task UploadTextAsync(string content, CancellationToken cancellationToken)
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.UploadTextAsync(content, encoding, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1914,7 +1900,7 @@ public Task UploadTextAsync(string content, Encoding encoding, AccessCondition a
/// To append data to an append blob that already exists, see .
///
[DoesServiceRequest]
- public Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginUploadText, this.EndUploadText, content, encoding, accessCondition, options, operationContext, cancellationToken);
}
@@ -1926,7 +1912,7 @@ public Task UploadTextAsync(string content, Encoding encoding, AccessCondition a
/// A string containing the text to upload.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AppendTextAsync(string content)
+ public virtual Task AppendTextAsync(string content)
{
return this.AppendTextAsync(content, CancellationToken.None);
}
@@ -1939,7 +1925,7 @@ public Task AppendTextAsync(string content)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AppendTextAsync(string content, CancellationToken cancellationToken)
+ public virtual Task AppendTextAsync(string content, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendText, this.EndAppendText, content, cancellationToken);
}
@@ -1958,7 +1944,7 @@ public Task AppendTextAsync(string content, CancellationToken cancellationToken)
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AppendTextAsync(content, encoding, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1978,7 +1964,7 @@ public Task AppendTextAsync(string content, Encoding encoding, AccessCondition a
/// If you have a single-writer scenario, see to determine whether setting this flag to true is acceptable for your scenario.
///
[DoesServiceRequest]
- public Task AppendTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAppendText, this.EndAppendText, content, encoding, accessCondition, options, operationContext, cancellationToken);
}
@@ -1993,7 +1979,7 @@ public Task AppendTextAsync(string content, Encoding encoding, AccessCondition a
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void CreateOrReplace(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void CreateOrReplace(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.AppendBlob, this.ServiceClient);
@@ -2012,7 +1998,7 @@ public void CreateOrReplace(AccessCondition accessCondition = null, BlobRequestO
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginCreateOrReplace(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginCreateOrReplace(AsyncCallback callback, object state)
{
return this.BeginCreateOrReplace(null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2028,7 +2014,7 @@ public ICancellableAsyncResult BeginCreateOrReplace(AsyncCallback callback, obje
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginCreateOrReplace(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginCreateOrReplace(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.AppendBlob, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -2043,7 +2029,7 @@ public ICancellableAsyncResult BeginCreateOrReplace(AccessCondition accessCondit
/// Ends an asynchronous operation to create an append blob.
///
/// An that references the pending asynchronous operation.
- public void EndCreateOrReplace(IAsyncResult asyncResult)
+ public virtual void EndCreateOrReplace(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -2055,7 +2041,7 @@ public void EndCreateOrReplace(IAsyncResult asyncResult)
///
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateOrReplaceAsync()
+ public virtual Task CreateOrReplaceAsync()
{
return this.CreateOrReplaceAsync(CancellationToken.None);
}
@@ -2067,7 +2053,7 @@ public Task CreateOrReplaceAsync()
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateOrReplaceAsync(CancellationToken cancellationToken)
+ public virtual Task CreateOrReplaceAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginCreateOrReplace, this.EndCreateOrReplace, cancellationToken);
}
@@ -2081,7 +2067,7 @@ public Task CreateOrReplaceAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.CreateOrReplaceAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2096,7 +2082,7 @@ public Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOpt
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginCreateOrReplace, this.EndCreateOrReplace, accessCondition, options, operationContext, cancellationToken);
}
@@ -2119,7 +2105,7 @@ public Task CreateOrReplaceAsync(AccessCondition accessCondition, BlobRequestOpt
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public long AppendBlock(Stream blockData, string contentMD5 = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual long AppendBlock(Stream blockData, string contentMD5 = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("blockData", blockData);
@@ -2182,7 +2168,7 @@ public long AppendBlock(Stream blockData, string contentMD5 = null, AccessCondit
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendBlock(Stream blockData, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, AsyncCallback callback, object state)
{
return this.BeginAppendBlock(blockData, null /* contentMD5 */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2202,7 +2188,7 @@ public ICancellableAsyncResult BeginAppendBlock(Stream blockData, AsyncCallback
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AsyncCallback callback, object state)
{
return this.BeginAppendBlock(blockData, contentMD5, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2226,7 +2212,7 @@ public ICancellableAsyncResult BeginAppendBlock(Stream blockData, string content
///
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Needed to ensure exceptions are not thrown on threadpool threads.")]
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("blockData", blockData);
@@ -2335,7 +2321,7 @@ private void AppendBlockHandler(Stream blockData, string contentMD5, AccessCondi
/// Ends an asynchronous operation to commit a new block of data to the end of the blob.
///
/// An that references the pending asynchronous operation.
- public long EndAppendBlock(IAsyncResult asyncResult)
+ public virtual long EndAppendBlock(IAsyncResult asyncResult)
{
StorageAsyncResult storageAsyncResult = (StorageAsyncResult)asyncResult;
@@ -2368,7 +2354,7 @@ public long EndAppendBlock(IAsyncResult asyncResult)
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public Task AppendBlockAsync(Stream blockData, string contentMD5 = null)
+ public virtual Task AppendBlockAsync(Stream blockData, string contentMD5 = null)
{
return this.AppendBlockAsync(blockData, contentMD5, CancellationToken.None);
}
@@ -2387,7 +2373,7 @@ public Task AppendBlockAsync(Stream blockData, string contentMD5 = null)
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public Task AppendBlockAsync(Stream blockData, string contentMD5, CancellationToken cancellationToken)
+ public virtual Task AppendBlockAsync(Stream blockData, string contentMD5, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginAppendBlock, this.EndAppendBlock, blockData, contentMD5, cancellationToken);
}
@@ -2408,7 +2394,7 @@ public Task AppendBlockAsync(Stream blockData, string contentMD5, Cancella
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AppendBlockAsync(blockData, contentMD5, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2430,7 +2416,7 @@ public Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCo
/// to null, then the client library will calculate the MD5 value internally.
///
[DoesServiceRequest]
- public Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginAppendBlock, this.EndAppendBlock, blockData, contentMD5, accessCondition, options, operationContext, cancellationToken);
}
@@ -2445,7 +2431,8 @@ public Task AppendBlockAsync(Stream blockData, string contentMD5, AccessCo
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
/// The contents of the blob, as a string.
- public string DownloadText(Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ [DoesServiceRequest]
+ public virtual string DownloadText(Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
using (SyncMemoryStream stream = new SyncMemoryStream())
{
@@ -2462,7 +2449,8 @@ public string DownloadText(Encoding encoding = null, AccessCondition accessCondi
/// An delegate that will receive notification when the asynchronous operation completes.
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
- public ICancellableAsyncResult BeginDownloadText(AsyncCallback callback, object state)
+ [DoesServiceRequest]
+ public virtual ICancellableAsyncResult BeginDownloadText(AsyncCallback callback, object state)
{
return this.BeginDownloadText(null /* encoding */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2477,7 +2465,8 @@ public ICancellableAsyncResult BeginDownloadText(AsyncCallback callback, object
/// An delegate that will receive notification when the asynchronous operation completes.
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
- public ICancellableAsyncResult BeginDownloadText(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ [DoesServiceRequest]
+ public virtual ICancellableAsyncResult BeginDownloadText(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
SyncMemoryStream stream = new SyncMemoryStream();
StorageAsyncResult storageAsyncResult = new StorageAsyncResult(callback, state) { OperationState = Tuple.Create(stream, encoding) };
@@ -2522,7 +2511,7 @@ private void DownloadTextCallback(IAsyncResult asyncResult)
///
/// An that references the pending asynchronous operation.
/// The contents of the blob, as a string.
- public string EndDownloadText(IAsyncResult asyncResult)
+ public virtual string EndDownloadText(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -2535,7 +2524,7 @@ public string EndDownloadText(IAsyncResult asyncResult)
///
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadTextAsync()
+ public virtual Task DownloadTextAsync()
{
return this.DownloadTextAsync(CancellationToken.None);
}
@@ -2546,7 +2535,7 @@ public Task DownloadTextAsync()
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadTextAsync(CancellationToken cancellationToken)
+ public virtual Task DownloadTextAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadText, this.EndDownloadText, cancellationToken);
}
@@ -2560,7 +2549,7 @@ public Task DownloadTextAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadTextAsync(encoding, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2575,7 +2564,7 @@ public Task DownloadTextAsync(Encoding encoding, AccessCondition accessC
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadText, this.EndDownloadText, encoding, accessCondition, options, operationContext, cancellationToken);
}
@@ -2596,7 +2585,7 @@ public Task DownloadTextAsync(Encoding encoding, AccessCondition accessC
/// The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
///
[DoesServiceRequest]
- public string StartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual string StartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
return this.StartCopy(CloudBlob.SourceBlobToUri(source), sourceAccessCondition, destAccessCondition, options, operationContext);
}
@@ -2610,7 +2599,7 @@ public string StartCopy(CloudAppendBlob source, AccessCondition sourceAccessCond
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AsyncCallback callback, object state)
{
return this.BeginStartCopy(CloudBlob.SourceBlobToUri(source), callback, state);
}
@@ -2627,7 +2616,7 @@ public ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AsyncCallb
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginStartCopy(CloudBlob.SourceBlobToUri(source), sourceAccessCondition, destAccessCondition, options, operationContext, callback, state);
}
@@ -2639,7 +2628,7 @@ public ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AccessCond
/// A object.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(CloudAppendBlob source)
+ public virtual Task StartCopyAsync(CloudAppendBlob source)
{
return this.StartCopyAsync(source, CancellationToken.None);
}
@@ -2651,7 +2640,7 @@ public Task StartCopyAsync(CloudAppendBlob source)
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(CloudAppendBlob source, CancellationToken cancellationToken)
+ public virtual Task StartCopyAsync(CloudAppendBlob source, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, cancellationToken);
}
@@ -2666,7 +2655,7 @@ public Task StartCopyAsync(CloudAppendBlob source, CancellationToken can
/// An object that represents the context for the current operation.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.StartCopyAsync(source, sourceAccessCondition, destAccessCondition, options, operationContext, CancellationToken.None);
}
@@ -2682,7 +2671,7 @@ public Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourc
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, sourceAccessCondition, destAccessCondition, options, operationContext, cancellationToken);
}
@@ -2698,7 +2687,7 @@ public Task StartCopyAsync(CloudAppendBlob source, AccessCondition sourc
/// An object that represents the context for the current operation.
/// A object that is a blob snapshot.
[DoesServiceRequest]
- public CloudAppendBlob CreateSnapshot(IDictionary metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual CloudAppendBlob CreateSnapshot(IDictionary metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.AppendBlob, this.ServiceClient);
@@ -2716,7 +2705,7 @@ public CloudAppendBlob CreateSnapshot(IDictionary metadata = nul
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginCreateSnapshot(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginCreateSnapshot(AsyncCallback callback, object state)
{
return this.BeginCreateSnapshot(null /* metadata */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2732,7 +2721,7 @@ public ICancellableAsyncResult BeginCreateSnapshot(AsyncCallback callback, objec
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginCreateSnapshot(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginCreateSnapshot(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.AppendBlob, this.ServiceClient);
@@ -2749,7 +2738,7 @@ public ICancellableAsyncResult BeginCreateSnapshot(IDictionary m
///
/// An that references the pending asynchronous operation.
/// A object that is a blob snapshot.
- public CloudAppendBlob EndCreateSnapshot(IAsyncResult asyncResult)
+ public virtual CloudAppendBlob EndCreateSnapshot(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -2760,7 +2749,7 @@ public CloudAppendBlob EndCreateSnapshot(IAsyncResult asyncResult)
///
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateSnapshotAsync()
+ public virtual Task CreateSnapshotAsync()
{
return this.CreateSnapshotAsync(CancellationToken.None);
}
@@ -2771,7 +2760,7 @@ public Task CreateSnapshotAsync()
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateSnapshotAsync(CancellationToken cancellationToken)
+ public virtual Task CreateSnapshotAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginCreateSnapshot, this.EndCreateSnapshot, cancellationToken);
}
@@ -2785,7 +2774,7 @@ public Task CreateSnapshotAsync(CancellationToken cancellationT
/// An object that represents the context for the current operation.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateSnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task CreateSnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.CreateSnapshotAsync(metadata, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2800,7 +2789,7 @@ public Task CreateSnapshotAsync(IDictionary met
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task CreateSnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task CreateSnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginCreateSnapshot, this.EndCreateSnapshot, metadata, accessCondition, options, operationContext, cancellationToken);
}
diff --git a/Lib/ClassLibraryCommon/Blob/CloudBlob.cs b/Lib/ClassLibraryCommon/Blob/CloudBlob.cs
index 0b7a7afd0..dd23c8297 100644
--- a/Lib/ClassLibraryCommon/Blob/CloudBlob.cs
+++ b/Lib/ClassLibraryCommon/Blob/CloudBlob.cs
@@ -48,7 +48,7 @@ public partial class CloudBlob : IListBlobItem
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public Stream OpenRead(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual Stream OpenRead(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.FetchAttributes(accessCondition, options, operationContext);
AccessCondition streamAccessCondition = AccessCondition.CloneConditionWithETag(accessCondition, this.Properties.ETag);
@@ -72,7 +72,7 @@ public Stream OpenRead(AccessCondition accessCondition = null, BlobRequestOption
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginOpenRead(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginOpenRead(AsyncCallback callback, object state)
{
return this.BeginOpenRead(null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -95,7 +95,7 @@ public ICancellableAsyncResult BeginOpenRead(AsyncCallback callback, object stat
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
StorageAsyncResult storageAsyncResult = new StorageAsyncResult(callback, state);
@@ -135,7 +135,7 @@ public ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, Bl
/// method must be called exactly once for every call.
/// Failing to end the read process before beginning another read process can cause unexpected behavior.
///
- public Stream EndOpenRead(IAsyncResult asyncResult)
+ public virtual Stream EndOpenRead(IAsyncResult asyncResult)
{
StorageAsyncResult storageAsyncResult = (StorageAsyncResult)asyncResult;
storageAsyncResult.End();
@@ -156,7 +156,7 @@ public Stream EndOpenRead(IAsyncResult asyncResult)
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public Task OpenReadAsync()
+ public virtual Task OpenReadAsync()
{
return this.OpenReadAsync(CancellationToken.None);
}
@@ -175,7 +175,7 @@ public Task OpenReadAsync()
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public Task OpenReadAsync(CancellationToken cancellationToken)
+ public virtual Task OpenReadAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginOpenRead, this.EndOpenRead, cancellationToken);
}
@@ -196,7 +196,7 @@ public Task OpenReadAsync(CancellationToken cancellationToken)
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.OpenReadAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -218,7 +218,7 @@ public Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOp
/// number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
///
[DoesServiceRequest]
- public Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginOpenRead, this.EndOpenRead, accessCondition, options, operationContext, cancellationToken);
}
@@ -232,7 +232,7 @@ public Task OpenReadAsync(AccessCondition accessCondition, BlobRequestOp
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void DownloadToStream(Stream target, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void DownloadToStream(Stream target, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.DownloadRangeToStream(target, null /* offset */, null /* length */, accessCondition, options, operationContext);
}
@@ -246,7 +246,7 @@ public void DownloadToStream(Stream target, AccessCondition accessCondition = nu
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallback callback, object state)
{
return this.BeginDownloadToStream(target, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -262,7 +262,7 @@ public ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallbac
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginDownloadRangeToStream(target, null /* offset */, null /* length */, accessCondition, options, operationContext, callback, state);
}
@@ -271,7 +271,7 @@ public ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondit
/// Ends an asynchronous operation to download the contents of a blob to a stream.
///
/// An that references the pending asynchronous operation.
- public void EndDownloadToStream(IAsyncResult asyncResult)
+ public virtual void EndDownloadToStream(IAsyncResult asyncResult)
{
this.EndDownloadRangeToStream(asyncResult);
}
@@ -283,7 +283,7 @@ public void EndDownloadToStream(IAsyncResult asyncResult)
/// A object representing the target stream.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToStreamAsync(Stream target)
+ public virtual Task DownloadToStreamAsync(Stream target)
{
return this.DownloadToStreamAsync(target, CancellationToken.None);
}
@@ -295,7 +295,7 @@ public Task DownloadToStreamAsync(Stream target)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToStreamAsync(Stream target, CancellationToken cancellationToken)
+ public virtual Task DownloadToStreamAsync(Stream target, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadToStream, this.EndDownloadToStream, target, cancellationToken);
}
@@ -309,7 +309,7 @@ public Task DownloadToStreamAsync(Stream target, CancellationToken cancellationT
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadToStreamAsync(target, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -324,7 +324,7 @@ public Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadToStream, this.EndDownloadToStream, target, accessCondition, options, operationContext, cancellationToken);
}
@@ -340,13 +340,14 @@ public Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void DownloadToFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void DownloadToFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("path", path);
+ FileStream fileStream = new FileStream(path, mode, FileAccess.Write);
try
{
- using (FileStream fileStream = new FileStream(path, mode, FileAccess.Write))
+ using (fileStream)
{
this.DownloadToStream(fileStream, accessCondition, options, operationContext);
}
@@ -380,7 +381,7 @@ public void DownloadToFile(string path, FileMode mode, AccessCondition accessCon
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AsyncCallback callback, object state)
{
return this.BeginDownloadToFile(path, mode, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -397,7 +398,7 @@ public ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, A
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("path", path);
@@ -478,7 +479,7 @@ private void DownloadToFileCallback(IAsyncResult asyncResult)
/// Ends an asynchronous operation to download the contents of a blob to a file.
///
/// An that references the pending asynchronous operation.
- public void EndDownloadToFile(IAsyncResult asyncResult)
+ public virtual void EndDownloadToFile(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -492,7 +493,7 @@ public void EndDownloadToFile(IAsyncResult asyncResult)
/// A enumeration value that determines how to open or create the file.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToFileAsync(string path, FileMode mode)
+ public virtual Task DownloadToFileAsync(string path, FileMode mode)
{
return this.DownloadToFileAsync(path, mode, CancellationToken.None);
}
@@ -505,7 +506,7 @@ public Task DownloadToFileAsync(string path, FileMode mode)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
+ public virtual Task DownloadToFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadToFile, this.EndDownloadToFile, path, mode, cancellationToken);
}
@@ -520,7 +521,7 @@ public Task DownloadToFileAsync(string path, FileMode mode, CancellationToken ca
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadToFileAsync(path, mode, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -536,7 +537,7 @@ public Task DownloadToFileAsync(string path, FileMode mode, AccessCondition acce
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadToFile, this.EndDownloadToFile, path, mode, accessCondition, options, operationContext, cancellationToken);
}
@@ -553,7 +554,7 @@ public Task DownloadToFileAsync(string path, FileMode mode, AccessCondition acce
/// An object that represents the context for the current operation.
/// The total number of bytes read into the buffer.
[DoesServiceRequest]
- public int DownloadToByteArray(byte[] target, int index, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual int DownloadToByteArray(byte[] target, int index, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
return this.DownloadRangeToByteArray(target, index, null /* blobOffset */, null /* length */, accessCondition, options, operationContext);
}
@@ -568,7 +569,7 @@ public int DownloadToByteArray(byte[] target, int index, AccessCondition accessC
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AsyncCallback callback, object state)
{
return this.BeginDownloadToByteArray(target, index, null /* accessCondition */, null /* options */, null /*operationContext */, callback, state);
}
@@ -585,7 +586,7 @@ public ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginDownloadRangeToByteArray(target, index, null /* blobOffset */, null /* length */, accessCondition, options, operationContext, callback, state);
}
@@ -595,7 +596,7 @@ public ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index
///
/// An that references the pending asynchronous operation.
/// The total number of bytes read into the buffer.
- public int EndDownloadToByteArray(IAsyncResult asyncResult)
+ public virtual int EndDownloadToByteArray(IAsyncResult asyncResult)
{
return this.EndDownloadRangeToByteArray(asyncResult);
}
@@ -608,7 +609,7 @@ public int EndDownloadToByteArray(IAsyncResult asyncResult)
/// The starting offset in the byte array.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToByteArrayAsync(byte[] target, int index)
+ public virtual Task DownloadToByteArrayAsync(byte[] target, int index)
{
return this.DownloadToByteArrayAsync(target, index, CancellationToken.None);
}
@@ -621,7 +622,7 @@ public Task DownloadToByteArrayAsync(byte[] target, int index)
/// A to observe while waiting for a task to complete.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToByteArrayAsync(byte[] target, int index, CancellationToken cancellationToken)
+ public virtual Task DownloadToByteArrayAsync(byte[] target, int index, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadToByteArray, this.EndDownloadToByteArray, target, index, cancellationToken);
}
@@ -636,7 +637,7 @@ public Task DownloadToByteArrayAsync(byte[] target, int index, Cancellation
/// An object that represents the context for the current operation.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadToByteArrayAsync(target, index, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -652,7 +653,7 @@ public Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondit
/// A to observe while waiting for a task to complete.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadToByteArray, this.EndDownloadToByteArray, target, index, accessCondition, options, operationContext, cancellationToken);
}
@@ -669,7 +670,7 @@ public Task DownloadToByteArrayAsync(byte[] target, int index, AccessCondit
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void DownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void DownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("target", target);
@@ -691,7 +692,7 @@ public void DownloadRangeToStream(Stream target, long? offset, long? length, Acc
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AsyncCallback callback, object state)
{
return this.BeginDownloadRangeToStream(target, offset, length, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -709,7 +710,7 @@ public ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? o
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("target", target);
@@ -726,7 +727,7 @@ public ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? o
/// Ends an asynchronous operation to download a range of bytes from a blob to a stream.
///
/// An that references the pending asynchronous operation.
- public void EndDownloadRangeToStream(IAsyncResult asyncResult)
+ public virtual void EndDownloadRangeToStream(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -740,7 +741,7 @@ public void EndDownloadRangeToStream(IAsyncResult asyncResult)
/// The length of the data to download from the blob, in bytes.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length)
+ public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length)
{
return this.DownloadRangeToStreamAsync(target, offset, length, CancellationToken.None);
}
@@ -754,7 +755,7 @@ public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, CancellationToken cancellationToken)
+ public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadRangeToStream, this.EndDownloadRangeToStream, target, offset, length, cancellationToken);
}
@@ -770,7 +771,7 @@ public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadRangeToStreamAsync(target, offset, length, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -787,7 +788,7 @@ public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDownloadRangeToStream, this.EndDownloadRangeToStream, target, offset, length, accessCondition, options, operationContext, cancellationToken);
}
@@ -806,7 +807,7 @@ public Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length
/// An object that represents the context for the current operation.
/// The total number of bytes read into the buffer.
[DoesServiceRequest]
- public int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
using (SyncMemoryStream stream = new SyncMemoryStream(target, index))
{
@@ -827,7 +828,7 @@ public int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset,
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AsyncCallback callback, object state)
{
return this.BeginDownloadRangeToByteArray(target, index, blobOffset, length, null /* accesCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -846,7 +847,7 @@ public ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
SyncMemoryStream stream = new SyncMemoryStream(target, index);
StorageAsyncResult storageAsyncResult = new StorageAsyncResult(callback, state) { OperationState = stream };
@@ -892,7 +893,7 @@ private void DownloadRangeToByteArrayCallback(IAsyncResult asyncResult)
///
/// An that references the pending asynchronous operation.
/// The total number of bytes read into the buffer.
- public int EndDownloadRangeToByteArray(IAsyncResult asyncResult)
+ public virtual int EndDownloadRangeToByteArray(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -909,7 +910,7 @@ public int EndDownloadRangeToByteArray(IAsyncResult asyncResult)
/// The length of the data to download from the blob, in bytes.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length)
+ public virtual Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length)
{
return this.DownloadRangeToByteArrayAsync(target, index, blobOffset, length, CancellationToken.None);
}
@@ -924,7 +925,7 @@ public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? b
/// A to observe while waiting for a task to complete.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, CancellationToken cancellationToken)
+ public virtual Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadRangeToByteArray, this.EndDownloadRangeToByteArray, target, index, blobOffset, length, cancellationToken);
}
@@ -941,7 +942,7 @@ public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? b
/// An object that represents the context for the current operation.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DownloadRangeToByteArrayAsync(target, index, blobOffset, length, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -959,7 +960,7 @@ public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? b
/// A to observe while waiting for a task to complete.
/// A object of type int that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDownloadRangeToByteArray, this.EndDownloadRangeToByteArray, target, index, blobOffset, length, accessCondition, options, operationContext, cancellationToken);
}
@@ -973,7 +974,7 @@ public Task DownloadRangeToByteArrayAsync(byte[] target, int index, long? b
/// An object that represents the context for the current operation.
/// true if the blob exists.
[DoesServiceRequest]
- public bool Exists(BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual bool Exists(BlobRequestOptions options = null, OperationContext operationContext = null)
{
return this.Exists(false, options, operationContext);
}
@@ -1002,7 +1003,7 @@ private bool Exists(bool primaryOnly, BlobRequestOptions options, OperationConte
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)
{
return this.BeginExists(null /* options */, null /* operationContext */, callback, state);
}
@@ -1016,7 +1017,7 @@ public ICancellableAsyncResult BeginExists(AsyncCallback callback, object state)
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginExists(BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginExists(BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
return this.BeginExists(false, options, operationContext, callback, state);
}
@@ -1046,7 +1047,7 @@ private ICancellableAsyncResult BeginExists(bool primaryOnly, BlobRequestOptions
///
/// An that references the pending asynchronous operation.
/// true if the blob exists.
- public bool EndExists(IAsyncResult asyncResult)
+ public virtual bool EndExists(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -1057,7 +1058,7 @@ public bool EndExists(IAsyncResult asyncResult)
///
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ExistsAsync()
+ public virtual Task ExistsAsync()
{
return this.ExistsAsync(CancellationToken.None);
}
@@ -1068,7 +1069,7 @@ public Task ExistsAsync()
/// A to observe while waiting for a task to complete.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ExistsAsync(CancellationToken cancellationToken)
+ public virtual Task ExistsAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginExists, this.EndExists, cancellationToken);
}
@@ -1080,7 +1081,7 @@ public Task ExistsAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ExistsAsync(BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task ExistsAsync(BlobRequestOptions options, OperationContext operationContext)
{
return this.ExistsAsync(options, operationContext, CancellationToken.None);
}
@@ -1093,7 +1094,7 @@ public Task ExistsAsync(BlobRequestOptions options, OperationContext opera
/// A to observe while waiting for a task to complete.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ExistsAsync(BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task ExistsAsync(BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginExists, this.EndExists, options, operationContext, cancellationToken);
}
@@ -1107,7 +1108,7 @@ public Task ExistsAsync(BlobRequestOptions options, OperationContext opera
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void FetchAttributes(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void FetchAttributes(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
Executor.ExecuteSync(
@@ -1124,7 +1125,7 @@ public void FetchAttributes(AccessCondition accessCondition = null, BlobRequestO
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, object state)
{
return this.BeginFetchAttributes(null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1139,7 +1140,7 @@ public ICancellableAsyncResult BeginFetchAttributes(AsyncCallback callback, obje
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -1154,7 +1155,7 @@ public ICancellableAsyncResult BeginFetchAttributes(AccessCondition accessCondit
/// Ends an asynchronous operation to populate the blob's properties and metadata.
///
/// An that references the pending asynchronous operation.
- public void EndFetchAttributes(IAsyncResult asyncResult)
+ public virtual void EndFetchAttributes(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -1165,7 +1166,7 @@ public void EndFetchAttributes(IAsyncResult asyncResult)
///
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task FetchAttributesAsync()
+ public virtual Task FetchAttributesAsync()
{
return this.FetchAttributesAsync(CancellationToken.None);
}
@@ -1176,7 +1177,7 @@ public Task FetchAttributesAsync()
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task FetchAttributesAsync(CancellationToken cancellationToken)
+ public virtual Task FetchAttributesAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginFetchAttributes, this.EndFetchAttributes, cancellationToken);
}
@@ -1189,7 +1190,7 @@ public Task FetchAttributesAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.FetchAttributesAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1203,7 +1204,7 @@ public Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOpt
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginFetchAttributes, this.EndFetchAttributes, accessCondition, options, operationContext, cancellationToken);
}
@@ -1217,7 +1218,7 @@ public Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOpt
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void SetMetadata(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void SetMetadata(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -1235,7 +1236,7 @@ public void SetMetadata(AccessCondition accessCondition = null, BlobRequestOptio
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object state)
{
return this.BeginSetMetadata(null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1250,7 +1251,7 @@ public ICancellableAsyncResult BeginSetMetadata(AsyncCallback callback, object s
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -1266,7 +1267,7 @@ public ICancellableAsyncResult BeginSetMetadata(AccessCondition accessCondition,
/// Ends an asynchronous operation to update the blob's metadata.
///
/// An that references the pending asynchronous operation.
- public void EndSetMetadata(IAsyncResult asyncResult)
+ public virtual void EndSetMetadata(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -1277,7 +1278,7 @@ public void EndSetMetadata(IAsyncResult asyncResult)
///
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetMetadataAsync()
+ public virtual Task SetMetadataAsync()
{
return this.SetMetadataAsync(CancellationToken.None);
}
@@ -1288,7 +1289,7 @@ public Task SetMetadataAsync()
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetMetadataAsync(CancellationToken cancellationToken)
+ public virtual Task SetMetadataAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginSetMetadata, this.EndSetMetadata, cancellationToken);
}
@@ -1301,7 +1302,7 @@ public Task SetMetadataAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.SetMetadataAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1315,7 +1316,7 @@ public Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginSetMetadata, this.EndSetMetadata, accessCondition, options, operationContext, cancellationToken);
}
@@ -1329,7 +1330,7 @@ public Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void SetProperties(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void SetProperties(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -1347,7 +1348,7 @@ public void SetProperties(AccessCondition accessCondition = null, BlobRequestOpt
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSetProperties(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSetProperties(AsyncCallback callback, object state)
{
return this.BeginSetProperties(null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1362,7 +1363,7 @@ public ICancellableAsyncResult BeginSetProperties(AsyncCallback callback, object
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSetProperties(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSetProperties(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -1378,7 +1379,7 @@ public ICancellableAsyncResult BeginSetProperties(AccessCondition accessConditio
/// Ends an asynchronous operation to update the blob's properties.
///
/// An that references the pending asynchronous operation.
- public void EndSetProperties(IAsyncResult asyncResult)
+ public virtual void EndSetProperties(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -1389,7 +1390,7 @@ public void EndSetProperties(IAsyncResult asyncResult)
///
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetPropertiesAsync()
+ public virtual Task SetPropertiesAsync()
{
return this.SetPropertiesAsync(CancellationToken.None);
}
@@ -1400,7 +1401,7 @@ public Task SetPropertiesAsync()
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetPropertiesAsync(CancellationToken cancellationToken)
+ public virtual Task SetPropertiesAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginSetProperties, this.EndSetProperties, cancellationToken);
}
@@ -1413,7 +1414,7 @@ public Task SetPropertiesAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.SetPropertiesAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1427,7 +1428,7 @@ public Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptio
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginSetProperties, this.EndSetProperties, accessCondition, options, operationContext, cancellationToken);
}
@@ -1442,7 +1443,7 @@ public Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptio
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void Delete(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void Delete(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
Executor.ExecuteSync(
@@ -1459,7 +1460,7 @@ public void Delete(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshots
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)
{
return this.BeginDelete(DeleteSnapshotsOption.None, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1475,7 +1476,7 @@ public ICancellableAsyncResult BeginDelete(AsyncCallback callback, object state)
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDelete(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDelete(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -1490,7 +1491,7 @@ public ICancellableAsyncResult BeginDelete(DeleteSnapshotsOption deleteSnapshots
/// Ends an asynchronous operation to delete the blob.
///
/// An that references the pending asynchronous operation.
- public void EndDelete(IAsyncResult asyncResult)
+ public virtual void EndDelete(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -1501,7 +1502,7 @@ public void EndDelete(IAsyncResult asyncResult)
///
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteAsync()
+ public virtual Task DeleteAsync()
{
return this.DeleteAsync(CancellationToken.None);
}
@@ -1512,7 +1513,7 @@ public Task DeleteAsync()
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteAsync(CancellationToken cancellationToken)
+ public virtual Task DeleteAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDelete, this.EndDelete, cancellationToken);
}
@@ -1526,7 +1527,7 @@ public Task DeleteAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DeleteAsync(deleteSnapshotsOption, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1541,7 +1542,7 @@ public Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondi
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginDelete, this.EndDelete, deleteSnapshotsOption, accessCondition, options, operationContext, cancellationToken);
}
@@ -1557,7 +1558,7 @@ public Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondi
/// An object that represents the context for the current operation.
/// true if the blob did already exist and was deleted; otherwise false.
[DoesServiceRequest]
- public bool DeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual bool DeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
operationContext = operationContext ?? new OperationContext();
@@ -1602,7 +1603,7 @@ public bool DeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption = DeleteS
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, object state)
{
return this.BeginDeleteIfExists(DeleteSnapshotsOption.None, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1618,7 +1619,7 @@ public ICancellableAsyncResult BeginDeleteIfExists(AsyncCallback callback, objec
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginDeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginDeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
operationContext = operationContext ?? new OperationContext();
@@ -1721,7 +1722,7 @@ private void DeleteIfExistsHandler(DeleteSnapshotsOption deleteSnapshotsOption,
///
/// An that references the pending asynchronous operation.
/// true if the blob did already exist and was deleted; otherwise, false.
- public bool EndDeleteIfExists(IAsyncResult asyncResult)
+ public virtual bool EndDeleteIfExists(IAsyncResult asyncResult)
{
StorageAsyncResult res = (StorageAsyncResult)asyncResult;
res.End();
@@ -1734,7 +1735,7 @@ public bool EndDeleteIfExists(IAsyncResult asyncResult)
///
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteIfExistsAsync()
+ public virtual Task DeleteIfExistsAsync()
{
return this.DeleteIfExistsAsync(CancellationToken.None);
}
@@ -1745,7 +1746,7 @@ public Task DeleteIfExistsAsync()
/// A to observe while waiting for a task to complete.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteIfExistsAsync(CancellationToken cancellationToken)
+ public virtual Task DeleteIfExistsAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDeleteIfExists, this.EndDeleteIfExists, cancellationToken);
}
@@ -1759,7 +1760,7 @@ public Task DeleteIfExistsAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.DeleteIfExistsAsync(deleteSnapshotsOption, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1774,7 +1775,7 @@ public Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOptio
/// A to observe while waiting for a task to complete.
/// A object of type bool that represents the asynchronous operation.
[DoesServiceRequest]
- public Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginDeleteIfExists, this.EndDeleteIfExists, deleteSnapshotsOption, accessCondition, options, operationContext, cancellationToken);
}
@@ -1793,7 +1794,7 @@ public Task DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOptio
/// An object that represents the context for the current operation.
/// The ID of the acquired lease.
[DoesServiceRequest]
- public string AcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual string AcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.ExecuteSync(
@@ -1814,7 +1815,7 @@ public string AcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCo
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AsyncCallback callback, object state)
{
return this.BeginAcquireLease(leaseTime, proposedLeaseId, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -1833,7 +1834,7 @@ public ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string pro
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -1849,7 +1850,7 @@ public ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string pro
///
/// An IAsyncResult that references the pending asynchronous operation.
/// The ID of the acquired lease.
- public string EndAcquireLease(IAsyncResult asyncResult)
+ public virtual string EndAcquireLease(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -1864,7 +1865,7 @@ public string EndAcquireLease(IAsyncResult asyncResult)
/// A string representing the proposed lease ID for the new lease, or null if no lease ID is proposed.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId)
+ public virtual Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId = null)
{
return this.AcquireLeaseAsync(leaseTime, proposedLeaseId, CancellationToken.None);
}
@@ -1879,7 +1880,7 @@ public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseI
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, CancellationToken cancellationToken)
+ public virtual Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginAcquireLease, this.EndAcquireLease, leaseTime, proposedLeaseId, cancellationToken);
}
@@ -1896,7 +1897,7 @@ public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseI
/// An object that represents the context for the current operation.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AcquireLeaseAsync(leaseTime, proposedLeaseId, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -1914,7 +1915,7 @@ public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseI
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginAcquireLease, this.EndAcquireLease, leaseTime, proposedLeaseId, accessCondition, options, operationContext, cancellationToken);
}
@@ -1928,7 +1929,7 @@ public Task AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseI
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void RenewLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void RenewLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
Executor.ExecuteSync(
@@ -1946,7 +1947,7 @@ public void RenewLease(AccessCondition accessCondition, BlobRequestOptions optio
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, AsyncCallback callback, object state)
{
return this.BeginRenewLease(accessCondition, null /* options */, null /* operationContext */, callback, state);
}
@@ -1961,7 +1962,7 @@ public ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition,
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -1976,7 +1977,7 @@ public ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition,
/// Ends an asynchronous operation to renew a lease on this blob.
///
/// An that references the pending asynchronous operation.
- public void EndRenewLease(IAsyncResult asyncResult)
+ public virtual void EndRenewLease(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -1988,7 +1989,7 @@ public void EndRenewLease(IAsyncResult asyncResult)
/// An object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task RenewLeaseAsync(AccessCondition accessCondition)
+ public virtual Task RenewLeaseAsync(AccessCondition accessCondition)
{
return this.RenewLeaseAsync(accessCondition, CancellationToken.None);
}
@@ -2000,7 +2001,7 @@ public Task RenewLeaseAsync(AccessCondition accessCondition)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task RenewLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
+ public virtual Task RenewLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginRenewLease, this.EndRenewLease, accessCondition, cancellationToken);
}
@@ -2013,7 +2014,7 @@ public Task RenewLeaseAsync(AccessCondition accessCondition, CancellationToken c
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.RenewLeaseAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2027,7 +2028,7 @@ public Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginRenewLease, this.EndRenewLease, accessCondition, options, operationContext, cancellationToken);
}
@@ -2043,7 +2044,7 @@ public Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions
/// An object that represents the context for the current operation.
/// The new lease ID.
[DoesServiceRequest]
- public string ChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual string ChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.ExecuteSync(
@@ -2062,7 +2063,7 @@ public string ChangeLease(string proposedLeaseId, AccessCondition accessConditio
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, AsyncCallback callback, object state)
{
return this.BeginChangeLease(proposedLeaseId, accessCondition, null /* options */, null /* operationContext */, callback, state);
}
@@ -2078,7 +2079,7 @@ public ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCo
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -2094,7 +2095,7 @@ public ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCo
///
/// An that references the pending asynchronous operation.
/// The new lease ID.
- public string EndChangeLease(IAsyncResult asyncResult)
+ public virtual string EndChangeLease(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -2107,7 +2108,7 @@ public string EndChangeLease(IAsyncResult asyncResult)
/// An object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition)
+ public virtual Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition)
{
return this.ChangeLeaseAsync(proposedLeaseId, accessCondition, CancellationToken.None);
}
@@ -2120,7 +2121,7 @@ public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition acc
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, CancellationToken cancellationToken)
+ public virtual Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginChangeLease, this.EndChangeLease, proposedLeaseId, accessCondition, cancellationToken);
}
@@ -2134,7 +2135,7 @@ public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition acc
/// An object that represents the context for the current operation.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.ChangeLeaseAsync(proposedLeaseId, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2149,7 +2150,7 @@ public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition acc
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginChangeLease, this.EndChangeLease, proposedLeaseId, accessCondition, options, operationContext, cancellationToken);
}
@@ -2163,7 +2164,7 @@ public Task ChangeLeaseAsync(string proposedLeaseId, AccessCondition acc
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void ReleaseLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void ReleaseLease(AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
Executor.ExecuteSync(
@@ -2181,7 +2182,7 @@ public void ReleaseLease(AccessCondition accessCondition, BlobRequestOptions opt
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, AsyncCallback callback, object state)
{
return this.BeginReleaseLease(accessCondition, null /* options */, null /* operationContext */, callback, state);
}
@@ -2196,7 +2197,7 @@ public ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -2211,7 +2212,7 @@ public ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition
/// Ends an asynchronous operation to release the lease on this blob.
///
/// An IAsyncResult that references the pending asynchronous operation.
- public void EndReleaseLease(IAsyncResult asyncResult)
+ public virtual void EndReleaseLease(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -2223,7 +2224,7 @@ public void EndReleaseLease(IAsyncResult asyncResult)
/// An object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ReleaseLeaseAsync(AccessCondition accessCondition)
+ public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition)
{
return this.ReleaseLeaseAsync(accessCondition, CancellationToken.None);
}
@@ -2235,7 +2236,7 @@ public Task ReleaseLeaseAsync(AccessCondition accessCondition)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ReleaseLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
+ public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginReleaseLease, this.EndReleaseLease, accessCondition, cancellationToken);
}
@@ -2248,7 +2249,7 @@ public Task ReleaseLeaseAsync(AccessCondition accessCondition, CancellationToken
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.ReleaseLeaseAsync(accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2262,7 +2263,7 @@ public Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOption
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginReleaseLease, this.EndReleaseLease, accessCondition, options, operationContext, cancellationToken);
}
@@ -2280,7 +2281,7 @@ public Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOption
/// An object that represents the context for the current operation.
/// A representing the amount of time before the lease ends, to the second.
[DoesServiceRequest]
- public TimeSpan BreakLease(TimeSpan? breakPeriod = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual TimeSpan BreakLease(TimeSpan? breakPeriod = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.ExecuteSync(
@@ -2300,7 +2301,7 @@ public TimeSpan BreakLease(TimeSpan? breakPeriod = null, AccessCondition accessC
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AsyncCallback callback, object state)
{
return this.BeginBreakLease(breakPeriod, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2318,7 +2319,7 @@ public ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AsyncCallb
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -2334,7 +2335,7 @@ public ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AccessCond
///
/// An IAsyncResult that references the pending asynchronous operation.
/// A representing the amount of time before the lease ends, to the second.
- public TimeSpan EndBreakLease(IAsyncResult asyncResult)
+ public virtual TimeSpan EndBreakLease(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -2348,7 +2349,7 @@ public TimeSpan EndBreakLease(IAsyncResult asyncResult)
/// or zero for infinite leases.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task BreakLeaseAsync(TimeSpan? breakPeriod)
+ public virtual Task BreakLeaseAsync(TimeSpan? breakPeriod)
{
return this.BreakLeaseAsync(breakPeriod, CancellationToken.None);
}
@@ -2362,7 +2363,7 @@ public Task BreakLeaseAsync(TimeSpan? breakPeriod)
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task BreakLeaseAsync(TimeSpan? breakPeriod, CancellationToken cancellationToken)
+ public virtual Task BreakLeaseAsync(TimeSpan? breakPeriod, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginBreakLease, this.EndBreakLease, breakPeriod, cancellationToken);
}
@@ -2378,7 +2379,7 @@ public Task BreakLeaseAsync(TimeSpan? breakPeriod, CancellationToken c
/// An object that represents the context for the current operation.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.BreakLeaseAsync(breakPeriod, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2395,146 +2396,12 @@ public Task BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition acc
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginBreakLease, this.EndBreakLease, breakPeriod, accessCondition, options, operationContext, cancellationToken);
}
#endif
-#if SYNC
- ///
- /// Begins an operation to start copying another blob's contents, properties, and metadata to this blob.
- ///
- /// The of the source blob.
- /// An object that represents the access conditions for the source blob. If null, no condition is used.
- /// An object that represents the access conditions for the destination blob. If null, no condition is used.
- /// A object that specifies additional options for the request. If null, default options are applied to the request.
- /// An object that represents the context for the current operation.
- /// The copy ID associated with the copy operation.
- ///
- /// This method fetches the blob's ETag, last-modified time, and part of the copy state.
- /// The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
- ///
- [Obsolete("Deprecated this method in favor of StartCopy.")]
- [DoesServiceRequest]
- public string StartCopyFromBlob(Uri source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
- {
- return this.StartCopy(source, sourceAccessCondition, destAccessCondition, options, operationContext);
- }
-#endif
-
- ///
- /// Begins an asynchronous operation to start copying another blob's contents, properties, and metadata to this blob.
- ///
- /// The of the source blob.
- /// An delegate that will receive notification when the asynchronous operation completes.
- /// A user-defined object that will be passed to the callback delegate.
- /// An that references the asynchronous operation.
- [Obsolete("Deprecated this method in favor of BeginStartCopy.")]
- [DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopyFromBlob(Uri source, AsyncCallback callback, object state)
- {
- return this.BeginStartCopy(source, null /* sourceAccessCondition */, null /* destAccessCondition */, null /* options */, null /* operationContext */, callback, state);
- }
-
- ///
- /// Begins an asynchronous operation to start copying another blob's contents, properties, and metadata to this blob.
- ///
- /// The of the source blob.
- /// An object that represents the access conditions for the source blob. If null, no condition is used.
- /// An object that represents the access conditions for the destination blob. If null, no condition is used.
- /// A object that specifies additional options for the request.
- /// An object that represents the context for the current operation.
- /// An delegate that will receive notification when the asynchronous operation completes.
- /// A user-defined object that will be passed to the callback delegate.
- /// An that references the asynchronous operation.
- [Obsolete("Deprecated this method in favor of BeginStartCopy.")]
- [DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopyFromBlob(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
- {
- return this.BeginStartCopy(source, sourceAccessCondition, destAccessCondition, options, operationContext, callback, state);
- }
-
- ///
- /// Ends an asynchronous operation to start copying another blob's contents, properties, and metadata to this blob.
- ///
- /// An that references the pending asynchronous operation.
- /// A string containing the copy ID associated with the copy operation.
- ///
- /// This method fetches the blob's ETag, last-modified time, and part of the copy state.
- /// The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
- ///
- [Obsolete("Deprecated this method in favor of EndStartCopy.")]
- public string EndStartCopyFromBlob(IAsyncResult asyncResult)
- {
- return Executor.EndExecuteAsync(asyncResult);
- }
-
-#if TASK
- ///
- /// Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
- /// to this blob.
- ///
- /// The of the source blob.
- /// A object of type string that represents the asynchronous operation.
- [Obsolete("Deprecated this method in favor of StartCopyAsync.")]
- [DoesServiceRequest]
- public Task StartCopyFromBlobAsync(Uri source)
- {
- return this.StartCopyAsync(source, CancellationToken.None);
- }
-
- ///
- /// Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
- /// to this blob.
- ///
- /// The of the source blob.
- /// A to observe while waiting for a task to complete.
- /// A object of type string that represents the asynchronous operation.
- [Obsolete("Deprecated this method in favor of StartCopyAsync.")]
- [DoesServiceRequest]
- public Task StartCopyFromBlobAsync(Uri source, CancellationToken cancellationToken)
- {
- return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, cancellationToken);
- }
-
- ///
- /// Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
- /// to this blob.
- ///
- /// The of the source blob.
- /// An object that represents the access conditions for the source blob. If null, no condition is used.
- /// An object that represents the access conditions for the destination blob. If null, no condition is used.
- /// A object that specifies additional options for the request.
- /// An object that represents the context for the current operation.
- /// A object of type string that represents the asynchronous operation.
- [Obsolete("Deprecated this method in favor of StartCopyAsync.")]
- [DoesServiceRequest]
- public Task StartCopyFromBlobAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
- {
- return this.StartCopyAsync(source, sourceAccessCondition, destAccessCondition, options, operationContext, CancellationToken.None);
- }
-
- ///
- /// Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
- /// to this blob.
- ///
- /// The of the source blob.
- /// An object that represents the access conditions for the source blob. If null, no condition is used.
- /// An object that represents the access conditions for the destination blob. If null, no condition is used.
- /// A object that specifies additional options for the request.
- /// An object that represents the context for the current operation.
- /// A to observe while waiting for a task to complete.
- /// A object of type string that represents the asynchronous operation.
- [Obsolete("Deprecated this method in favor of StartCopyAsync.")]
- [DoesServiceRequest]
- public Task StartCopyFromBlobAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
- {
- return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, sourceAccessCondition, destAccessCondition, options, operationContext, cancellationToken);
- }
-
- #endif
-
#if SYNC
///
/// Begins an operation to start copying another blob's contents, properties, and metadata to this blob.
@@ -2550,7 +2417,7 @@ public Task StartCopyFromBlobAsync(Uri source, AccessCondition sourceAcc
/// The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
///
[DoesServiceRequest]
- public string StartCopy(Uri source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual string StartCopy(Uri source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
CommonUtility.AssertNotNull("source", source);
this.attributes.AssertNoSnapshot();
@@ -2570,7 +2437,7 @@ public string StartCopy(Uri source, AccessCondition sourceAccessCondition = null
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopy(Uri source, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginStartCopy(Uri source, AsyncCallback callback, object state)
{
return this.BeginStartCopy(source, null /* sourceAccessCondition */, null /* destAccessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2587,7 +2454,7 @@ public ICancellableAsyncResult BeginStartCopy(Uri source, AsyncCallback callback
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginStartCopy(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginStartCopy(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
CommonUtility.AssertNotNull("source", source);
this.attributes.AssertNoSnapshot();
@@ -2609,7 +2476,7 @@ public ICancellableAsyncResult BeginStartCopy(Uri source, AccessCondition source
/// This method fetches the blob's ETag, last-modified time, and part of the copy state.
/// The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
///
- public string EndStartCopy(IAsyncResult asyncResult)
+ public virtual string EndStartCopy(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -2622,7 +2489,7 @@ public string EndStartCopy(IAsyncResult asyncResult)
/// The of the source blob.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(Uri source)
+ public virtual Task StartCopyAsync(Uri source)
{
return this.StartCopyAsync(source, CancellationToken.None);
}
@@ -2635,7 +2502,7 @@ public Task StartCopyAsync(Uri source)
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(Uri source, CancellationToken cancellationToken)
+ public virtual Task StartCopyAsync(Uri source, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, cancellationToken);
}
@@ -2651,7 +2518,7 @@ public Task StartCopyAsync(Uri source, CancellationToken cancellationTok
/// An object that represents the context for the current operation.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.StartCopyAsync(source, sourceAccessCondition, destAccessCondition, options, operationContext, CancellationToken.None);
}
@@ -2668,7 +2535,7 @@ public Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondi
/// A to observe while waiting for a task to complete.
/// A object of type string that represents the asynchronous operation.
[DoesServiceRequest]
- public Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginStartCopy, this.EndStartCopy, source, sourceAccessCondition, destAccessCondition, options, operationContext, cancellationToken);
}
@@ -2684,7 +2551,7 @@ public Task StartCopyAsync(Uri source, AccessCondition sourceAccessCondi
/// A object that specifies additional options for the request. If null, default options are applied to the request.
/// An object that represents the context for the current operation.
[DoesServiceRequest]
- public void AbortCopy(string copyId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual void AbortCopy(string copyId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
Executor.ExecuteSync(
@@ -2702,7 +2569,7 @@ public void AbortCopy(string copyId, AccessCondition accessCondition = null, Blo
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callback, object state)
{
return this.BeginAbortCopy(copyId, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2718,7 +2585,7 @@ public ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callb
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
return Executor.BeginExecuteAsync(
@@ -2733,7 +2600,7 @@ public ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition acc
/// Ends an asynchronous operation to abort an ongoing blob copy operation.
///
/// An that references the pending asynchronous operation.
- public void EndAbortCopy(IAsyncResult asyncResult)
+ public virtual void EndAbortCopy(IAsyncResult asyncResult)
{
Executor.EndExecuteAsync(asyncResult);
}
@@ -2745,7 +2612,7 @@ public void EndAbortCopy(IAsyncResult asyncResult)
/// A string identifying the copy operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AbortCopyAsync(string copyId)
+ public virtual Task AbortCopyAsync(string copyId)
{
return this.AbortCopyAsync(copyId, CancellationToken.None);
}
@@ -2757,7 +2624,7 @@ public Task AbortCopyAsync(string copyId)
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AbortCopyAsync(string copyId, CancellationToken cancellationToken)
+ public virtual Task AbortCopyAsync(string copyId, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAbortCopy, this.EndAbortCopy, copyId, cancellationToken);
}
@@ -2771,7 +2638,7 @@ public Task AbortCopyAsync(string copyId, CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.AbortCopyAsync(copyId, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2786,7 +2653,7 @@ public Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobR
/// A to observe while waiting for a task to complete.
/// A object that represents the asynchronous operation.
[DoesServiceRequest]
- public Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromVoidApm(this.BeginAbortCopy, this.EndAbortCopy, copyId, accessCondition, options, operationContext, cancellationToken);
}
@@ -2802,7 +2669,7 @@ public Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobR
/// An object that represents the context for the current operation.
/// A object that is a blob snapshot.
[DoesServiceRequest]
- public CloudBlob Snapshot(IDictionary metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual CloudBlob Snapshot(IDictionary metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -2820,7 +2687,7 @@ public CloudBlob Snapshot(IDictionary metadata = null, AccessCon
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSnapshot(AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSnapshot(AsyncCallback callback, object state)
{
return this.BeginSnapshot(null /* metadata */, null /* accessCondition */, null /* options */, null /* operationContext */, callback, state);
}
@@ -2836,7 +2703,7 @@ public ICancellableAsyncResult BeginSnapshot(AsyncCallback callback, object stat
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginSnapshot(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginSnapshot(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
this.attributes.AssertNoSnapshot();
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this.ServiceClient);
@@ -2853,7 +2720,7 @@ public ICancellableAsyncResult BeginSnapshot(IDictionary metadat
///
/// An that references the pending asynchronous operation.
/// A object that is a blob snapshot.
- public CloudBlob EndSnapshot(IAsyncResult asyncResult)
+ public virtual CloudBlob EndSnapshot(IAsyncResult asyncResult)
{
return Executor.EndExecuteAsync(asyncResult);
}
@@ -2864,7 +2731,7 @@ public CloudBlob EndSnapshot(IAsyncResult asyncResult)
///
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SnapshotAsync()
+ public virtual Task SnapshotAsync()
{
return this.SnapshotAsync(CancellationToken.None);
}
@@ -2875,7 +2742,7 @@ public Task SnapshotAsync()
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SnapshotAsync(CancellationToken cancellationToken)
+ public virtual Task SnapshotAsync(CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginSnapshot, this.EndSnapshot, cancellationToken);
}
@@ -2889,7 +2756,7 @@ public Task SnapshotAsync(CancellationToken cancellationToken)
/// An object that represents the context for the current operation.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
+ public virtual Task SnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
{
return this.SnapshotAsync(metadata, accessCondition, options, operationContext, CancellationToken.None);
}
@@ -2904,7 +2771,7 @@ public Task SnapshotAsync(IDictionary metadata, Acces
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task SnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
+ public virtual Task SnapshotAsync(IDictionary metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginSnapshot, this.EndSnapshot, metadata, accessCondition, options, operationContext, cancellationToken);
}
diff --git a/Lib/ClassLibraryCommon/Blob/CloudBlobClient.cs b/Lib/ClassLibraryCommon/Blob/CloudBlobClient.cs
index 076433a49..0ea61a587 100644
--- a/Lib/ClassLibraryCommon/Blob/CloudBlobClient.cs
+++ b/Lib/ClassLibraryCommon/Blob/CloudBlobClient.cs
@@ -38,7 +38,7 @@ namespace Microsoft.WindowsAzure.Storage.Blob
///
/// The service client encapsulates the endpoint or endpoints for the Blob service. If the service client will be used for authenticated access,
/// it also encapsulates the credentials for accessing the storage account.
- public sealed partial class CloudBlobClient
+ public partial class CloudBlobClient
{
private IAuthenticationHandler authenticationHandler;
@@ -107,7 +107,7 @@ internal IAuthenticationHandler AuthenticationHandler
/// An object that represents the context for the current operation.
/// An enumerable collection of objects that are retrieved lazily.
[DoesServiceRequest]
- public IEnumerable ListContainers(string prefix = null, ContainerListingDetails detailsIncluded = ContainerListingDetails.None, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual IEnumerable ListContainers(string prefix = null, ContainerListingDetails detailsIncluded = ContainerListingDetails.None, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this);
return CommonUtility.LazyEnumerable(
@@ -121,7 +121,7 @@ public IEnumerable ListContainers(string prefix = null, Cont
/// A object returned by a previous listing operation.
/// A object.
[DoesServiceRequest]
- public ContainerResultSegment ListContainersSegmented(BlobContinuationToken currentToken)
+ public virtual ContainerResultSegment ListContainersSegmented(BlobContinuationToken currentToken)
{
return this.ListContainersSegmented(null /* prefix */, ContainerListingDetails.None, null /* maxResults */, currentToken, null /* options */, null /* operationContext */);
}
@@ -133,7 +133,7 @@ public ContainerResultSegment ListContainersSegmented(BlobContinuationToken curr
/// A object returned by a previous listing operation.
/// A object.
[DoesServiceRequest]
- public ContainerResultSegment ListContainersSegmented(string prefix, BlobContinuationToken currentToken)
+ public virtual ContainerResultSegment ListContainersSegmented(string prefix, BlobContinuationToken currentToken)
{
return this.ListContainersSegmented(prefix, ContainerListingDetails.None, null /* maxResults */, currentToken, null /* options */, null /* operationContext */);
}
@@ -150,7 +150,7 @@ public ContainerResultSegment ListContainersSegmented(string prefix, BlobContinu
/// An object that represents the context for the current operation.
/// A object.
[DoesServiceRequest]
- public ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options = null, OperationContext operationContext = null)
+ public virtual ContainerResultSegment ListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken currentToken, BlobRequestOptions options = null, OperationContext operationContext = null)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this);
ResultSegment resultSegment = this.ListContainersSegmentedCore(prefix, detailsIncluded, maxResults, currentToken, modifiedOptions, operationContext);
@@ -186,7 +186,7 @@ private ResultSegment ListContainersSegmentedCore(string pre
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginListContainersSegmented(BlobContinuationToken continuationToken, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginListContainersSegmented(BlobContinuationToken continuationToken, AsyncCallback callback, object state)
{
return this.BeginListContainersSegmented(null /* prefix */, ContainerListingDetails.None, null /* maxResults */, continuationToken, null /* options */, null /* operationContext */, callback, state);
}
@@ -200,7 +200,7 @@ public ICancellableAsyncResult BeginListContainersSegmented(BlobContinuationToke
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginListContainersSegmented(string prefix, BlobContinuationToken continuationToken, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginListContainersSegmented(string prefix, BlobContinuationToken continuationToken, AsyncCallback callback, object state)
{
return this.BeginListContainersSegmented(prefix, ContainerListingDetails.None, null /* maxResults */, continuationToken, null /* options */, null /* operationContext */, callback, state);
}
@@ -220,7 +220,7 @@ public ICancellableAsyncResult BeginListContainersSegmented(string prefix, BlobC
/// A user-defined object that will be passed to the callback delegate.
/// An that references the asynchronous operation.
[DoesServiceRequest]
- public ICancellableAsyncResult BeginListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
+ public virtual ICancellableAsyncResult BeginListContainersSegmented(string prefix, ContainerListingDetails detailsIncluded, int? maxResults, BlobContinuationToken continuationToken, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
{
BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.Unspecified, this);
return Executor.BeginExecuteAsync(
@@ -236,7 +236,7 @@ public ICancellableAsyncResult BeginListContainersSegmented(string prefix, Conta
///
/// An that references the pending asynchronous operation.
/// A object.
- public ContainerResultSegment EndListContainersSegmented(IAsyncResult asyncResult)
+ public virtual ContainerResultSegment EndListContainersSegmented(IAsyncResult asyncResult)
{
ResultSegment resultSegment = Executor.EndExecuteAsync>(asyncResult);
return new ContainerResultSegment(resultSegment.Results, (BlobContinuationToken)resultSegment.ContinuationToken);
@@ -249,7 +249,7 @@ public ContainerResultSegment EndListContainersSegmented(IAsyncResult asyncResul
/// A object returned by a previous listing operation.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ListContainersSegmentedAsync(BlobContinuationToken continuationToken)
+ public virtual Task ListContainersSegmentedAsync(BlobContinuationToken continuationToken)
{
return this.ListContainersSegmentedAsync(continuationToken, CancellationToken.None);
}
@@ -261,7 +261,7 @@ public Task ListContainersSegmentedAsync(BlobContinuatio
/// A to observe while waiting for a task to complete.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ListContainersSegmentedAsync(BlobContinuationToken continuationToken, CancellationToken cancellationToken)
+ public virtual Task ListContainersSegmentedAsync(BlobContinuationToken continuationToken, CancellationToken cancellationToken)
{
return AsyncExtensions.TaskFromApm(this.BeginListContainersSegmented, this.EndListContainersSegmented, continuationToken, cancellationToken);
}
@@ -273,7 +273,7 @@ public Task ListContainersSegmentedAsync(BlobContinuatio
/// A object returned by a previous listing operation.
/// A object of type that represents the asynchronous operation.
[DoesServiceRequest]
- public Task ListContainersSegmentedAsync(string prefix, BlobContinuationToken continuationToken)
+ public virtual Task ListContainersSegmentedAsync(string prefix, BlobContinuationToken continuationToken)
{
return this.ListContainersSegmentedAsync(prefix, continuationToken, CancellationToken.None);
}
@@ -286,7 +286,7 @@ public Task