本文整理匯總了C#中Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity.Deserialize方法的典型用法代碼示例。如果您正苦於以下問題:C# DynamicTableEntity.Deserialize方法的具體用法?C# DynamicTableEntity.Deserialize怎麽用?C# DynamicTableEntity.Deserialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity
的用法示例。
在下文中一共展示了DynamicTableEntity.Deserialize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FetchFatEntity
private async Task<DynamicTableEntity> FetchFatEntity(DynamicTableEntity e)
{
var size = e.Properties["fat"].Int32Value.Value;
byte[] bytes = new byte[size];
await Configuration
.GetBlocksContainer()
.GetBlockBlobReference(e.GetFatBlobName())
.DownloadRangeToByteArrayAsync(bytes, 0, 0, bytes.Length).ConfigureAwait(false);
e = new DynamicTableEntity();
e.Deserialize(bytes);
return e;
}
示例2: CanSerializeDeserializeTableEntity
public void CanSerializeDeserializeTableEntity()
{
DynamicTableEntity entity = new DynamicTableEntity("partition", "row");
entity.Properties.Add("propertyname", new EntityProperty("propertyvalue"));
var val = entity.Serialize();
DynamicTableEntity entity2 = new DynamicTableEntity();
entity2.Deserialize(val);
Assert.Equal("partition", entity2.PartitionKey);
Assert.Equal("row", entity2.RowKey);
Assert.Equal("propertyvalue", entity2.Properties["propertyname"].StringValue);
Assert.True(entity2.Serialize().SequenceEqual(entity.Serialize()));
}