Ejemplo n.º 1
0
        public static HttpRequestMessage CreateContainerRequest(BlobContext context, string containerName)
        {
            Uri uri = BlobClientTests.ConstructUri(context.Address, containerName);
            OperationContext   opContext = new OperationContext();
            HttpRequestMessage request   = ContainerHttpRequestMessageFactory.Create(uri, context.Timeout, null,
                                                                                     opContext,
                                                                                     SharedKeyCanonicalizer.Instance,
                                                                                     context.Credentials);

            Assert.IsNotNull(request);
            Assert.IsNotNull(request.Method);
            Assert.AreEqual(HttpMethod.Put, request.Method);
            BlobTestUtils.RangeHeader(request, null);
            BlobTestUtils.LeaseIdHeader(request, null);
            return(request);
        }
 /// <summary>
 /// Constructs a web request to create a new container.
 /// </summary>
 /// <param name="uri">The absolute URI to the container.</param>
 /// <param name="timeout">The server timeout interval.</param>
 /// <returns>A web request to use to perform the operation.</returns>
 public static StorageRequestMessage Create(Uri uri, int?timeout, HttpContent content, OperationContext operationContext, ICanonicalizer canonicalizer, StorageCredentials credentials)
 {
     return(ContainerHttpRequestMessageFactory.Create(uri, timeout, content, operationContext, BlobContainerPublicAccessType.Off, canonicalizer, credentials));
 }
 /// <summary>
 /// Constructs a web request to create a new container.
 /// </summary>
 /// <param name="uri">The absolute URI to the container.</param>
 /// <param name="timeout">The server timeout interval.</param>
 /// <returns>A web request to use to perform the operation.</returns>
 public static HttpRequestMessage Create(Uri uri, int?timeout, HttpContent content, OperationContext operationContext)
 {
     return(ContainerHttpRequestMessageFactory.Create(uri, timeout, content, operationContext, BlobContainerPublicAccessType.Off));
 }