public static System.Collections.IEnumerable QueryTable( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString tableName, SqlString xmsclientrequestId) { ITPCfSQL.Azure.AzureTableService ats = new AzureTableService(accountName.Value, sharedKey.Value, useHTTPS.Value); ITPCfSQL.Azure.Table t = ats.GetTable(tableName.Value); return(t.Query(xmsclientrequestId != null ? xmsclientrequestId.Value : null)); }
public static void _ListTablesCallback(Object obj, out SqlString name, out SqlString url) { if (!(obj is ITPCfSQL.Azure.Table)) { throw new ArgumentException("Expected " + typeof(ITPCfSQL.Azure.Table).ToString() + ", received " + obj.GetType().FullName); } ITPCfSQL.Azure.Table t = (ITPCfSQL.Azure.Table)obj; name = t.Name; url = t.Url.ToString(); }
public static void DeleteEntity( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString tableName, SqlString partitionKey, SqlString rowKey, SqlString xmsclientrequestId) { ITPCfSQL.Azure.AzureTableService ats = new AzureTableService(accountName.Value, sharedKey.Value, useHTTPS.Value); ITPCfSQL.Azure.Table table = ats.GetTable(tableName.Value); table.Delete(new ITPCfSQL.Azure.TableEntity() { RowKey = rowKey.Value, PartitionKey = partitionKey.Value, TimeStamp = DateTime.Now }, (xmsclientrequestId != null ? xmsclientrequestId.Value : null)); }
public static void InsertOrReplaceEntity( SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS, SqlString tableName, SqlString partitionKey, SqlString rowKey, SqlXml AttributeList, SqlString xmsclientrequestId) { ITPCfSQL.Azure.AzureTableService ats = new AzureTableService(accountName.Value, sharedKey.Value, useHTTPS.Value); ITPCfSQL.Azure.Table table = ats.GetTable(tableName.Value); ITPCfSQL.Azure.TableEntity te = new TableEntity(partitionKey.Value, rowKey.Value); System.Xml.XmlDocument doc = new System.Xml.XmlDocument(); doc.LoadXml(AttributeList.Value); foreach (System.Xml.XmlNode nAttrib in doc.FirstChild.ChildNodes) { te.Attributes[nAttrib.Name] = nAttrib.InnerText; } table.InsertOrUpdate(te, xmsclientrequestId != null ? xmsclientrequestId.Value : null); }