Beispiel #1
0
        public void Create(ConfirmedBalanceLocator locator, T item)
        {
            var str    = Serializer.ToString(item);
            var entity = new DynamicTableEntity(Escape(Scope), Escape(locator));

            PutData(entity, str);
            Table.Execute(TableOperation.InsertOrReplace(entity));
        }
Beispiel #2
0
        public void Create(ConfirmedBalanceLocator locator, T item)
        {
            var str    = JsonConvert.SerializeObject(item, serializerSettings);
            var entity = new DynamicTableEntity(Escape(Scope), Escape(locator));

            PutData(entity, str);
            Table.Execute(TableOperation.InsertOrReplace(entity));
        }
Beispiel #3
0
        public void Delete(ConfirmedBalanceLocator locator)
        {
            var entity = new DynamicTableEntity(Escape(Scope), Escape(locator))
            {
                ETag = "*"
            };

            Table.Execute(TableOperation.Delete(entity));
        }
Beispiel #4
0
        public void Create(ConfirmedBalanceLocator locator, T item)
        {
            var str    = Serializer.ToString(item);
            var entity = new DynamicTableEntity(Escape(Scope), Escape(locator))
            {
                Properties =
                {
                    new KeyValuePair <string, EntityProperty>("data", new EntityProperty(str))
                }
            };

            Table.Execute(TableOperation.InsertOrReplace(entity));
        }
Beispiel #5
0
 private static ConfirmedBalanceLocator Normalize(ConfirmedBalanceLocator locator)
 {
     locator = new ConfirmedBalanceLocator(locator.Height, locator.BlockHash ?? new uint256(0), locator.TransactionId ?? new uint256(0));
     return(locator);
 }
Beispiel #6
0
 private static string Escape(ConfirmedBalanceLocator locator)
 {
     locator = Normalize(locator);
     return("-" + locator.ToString(true));
 }