ElmcityUtils.TableStorage.ExistsTable C# (CSharp) Method

ExistsTable() public method

public ExistsTable ( string tablename ) : TableStorageBoolResponse
tablename string
return TableStorageBoolResponse
        public TableStorageBoolResponse ExistsTable(string tablename)
        {
            var ts_response = ListTables();
            var found = false;
            var dicts = ts_response.list_dict_obj;
            foreach (var dict in dicts)
            {
                if ((string)dict["TableName"] == tablename)
                    found = true;
            }
            return new TableStorageBoolResponse (ts_response.http_response, found);
        }

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);
 }
All Usage Examples Of ElmcityUtils.TableStorage::ExistsTable