예제 #1
0
        public async Task DeleteFile(string shareName, string fileName)
        {
            HttpRequestMessage request = FileTests.DeleteFileRequest(FileContext, shareName, fileName, null);

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

            response.Dispose();
        }
예제 #2
0
        public void DeleteFile(string shareName, string fileName)
        {
            HttpWebRequest request = FileTests.DeleteFileRequest(FileContext, shareName, fileName, null);

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

            response.Close();
        }