[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See
Storage Client Library for the latest version.]
Gets or sets the service timeout for the request.
Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
Usage
Visual Basic |
---|
Dim instance As BlobRequestOptions
Dim value As Nullable(Of TimeSpan)
value = instance.Timeout
instance.Timeout = value |
Syntax
Visual Basic |
---|
Public Property Timeout As Nullable(Of TimeSpan) |
C# |
---|
public Nullable<TimeSpan> Timeout { get; set; } |
C++ |
---|
public:
property Nullable<TimeSpan> Timeout {
Nullable<TimeSpan> get ();
void set (Nullable<TimeSpan> value);
} |
Property Value
Type:
System.NullableThe service timeout interval for the request.
Example
The following code uploads a file to a blob using a timeout of 20 seconds for the operation.
C# | Copy Code |
---|
var account = CloudStorageAccount.Parse
("AccountName=myaccount;AccountKey=mykey;DefaultEndpointsProtocol=http");
var blobClient = account.CreateCloudBlobClient();
var container = blobClient.GetContainerReference("testcontainer");
var blob = container.GetBlobReference("testblob");
BlobRequestOptions blobRequestOptions = new BlobRequestOptions();
blobRequestOptions.Timeout = TimeSpan.FromSeconds(20.0);
blob.UploadFile("myfile.txt", blobRequestOptions); |
Remarks
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Change History
See Also