ElmcityUtils.TableStorage.DeleteTable C# (CSharp) Method

DeleteTable() public method

public DeleteTable ( string tablename ) : TableStorageHttpResponse
tablename string
return TableStorageHttpResponse
        public TableStorageHttpResponse DeleteTable(string tablename)
        {
            var inpath = string.Format("Tables('{0}')", tablename);
            var http_response = DoTableStoreRequest(inpath, query_string: null, method: "DELETE", headers: new Hashtable(), data: null);
            if (http_response.status == HttpStatusCode.ServiceUnavailable)
                throw new Exception("TableServiceUnavailable");
            else
                return new TableStorageHttpResponse(http_response, null_bytes: true);
        }

Usage Example

Beispiel #1
0
 public void CreateTableIsSuccessful()
 {
     ts.DeleteTable(test_table);
     HttpUtils.Wait(long_wait);
     ts.CreateTable(test_table);
     HttpUtils.Wait(short_wait);
     Assert.IsTrue((bool)ts.ExistsTable(test_table).boolean);
 }