Ejemplo n.º 1
0
 public static void DropTable(
     SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS,
     SqlString tableName,
     SqlGuid xmsclientrequestId)
 {
     ITPCfSQL.Azure.AzureTableService ats = new AzureTableService(accountName.Value, sharedKey.Value, useHTTPS.Value);
     ats.GetTable(tableName.Value).Drop(
         xmsclientrequestId.IsNull ? (Guid?)null : xmsclientrequestId.Value);
 }
Ejemplo n.º 2
0
 public static void DropTable(
     SqlString accountName, SqlString sharedKey, SqlBoolean useHTTPS,
     SqlString tableName,
     SqlGuid xmsclientrequestId)
 {
     ITPCfSQL.Azure.AzureTableService ats = new AzureTableService(accountName.Value, sharedKey.Value, useHTTPS.Value);
     ats.GetTable(tableName.Value).Drop(
         xmsclientrequestId.IsNull ? (Guid?)null : xmsclientrequestId.Value);
 }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 5
0
 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));
 }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        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);
        }