Ejemplo n.º 1
0
        public void WriteSuccessEnablement(string apim, string email, string props, string pwd, bool enabled)
        {
            CloudStorageAccount storageAcc = CloudStorageAccount.Parse(storageConn);
            CloudTableClient    tblclient  = storageAcc.CreateCloudTableClient(new TableClientConfiguration());
            CloudTable          table      = tblclient.GetTableReference(storageTable);

            APIMUser au = new APIMUser(apim, email, props, pwd, enabled);

            TableOperation insertOperation = TableOperation.InsertOrMerge(au);
            var            results         = table.Execute(insertOperation);

            return;
        }
Ejemplo n.º 2
0
        public void WriteSuccessEnablement(string apim, string email, string userId, string props, string pwd, bool enabled)
        {
            try
            {
                CloudStorageAccount storageAcc = CloudStorageAccount.Parse(storageConn);
                CloudTableClient    tblclient  = storageAcc.CreateCloudTableClient(new TableClientConfiguration());
                CloudTable          table      = tblclient.GetTableReference(storageTable);

                APIMUser au = new APIMUser(apim, email, userId, props, pwd, enabled);

                TableOperation insertOperation = TableOperation.InsertOrMerge(au);
                var            results         = table.Execute(insertOperation);

                Console.WriteLine("Finished writing to the accountLog" + props);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception in write accountLog " + ex.Message);
            }
            return;
        }