Exemple #1
0
        public async Task DeleteShare(string shareName)
        {
            HttpRequestMessage request = FileTests.DeleteShareRequest(FileContext, shareName, null);

            Assert.IsTrue(request != null, "Failed to create HttpRequestMessage");
            HttpResponseMessage response = await FileTestUtils.GetResponse(request, FileContext);

            HttpStatusCode statusCode        = response.StatusCode;
            string         statusDescription = response.ReasonPhrase;

            response.Dispose();
        }
        public void DeleteShare(string shareName)
        {
            HttpWebRequest request = FileTests.DeleteShareRequest(FileContext, shareName, null);

            Assert.IsTrue(request != null, "Failed to create HttpWebRequest");
            if (FileContext.Credentials != null)
            {
                FileTests.SignRequest(request, FileContext);
            }
            HttpWebResponse response          = FileTestUtils.GetResponse(request, FileContext);
            HttpStatusCode  statusCode        = response.StatusCode;
            string          statusDescription = response.StatusDescription;

            response.Close();
        }