public Item ToItem() { var item = new Item { Payload = Payload }; var ids = PartitionKey.Split('$'); var productionTimeTicks = long.Parse(RowKey.Split('$')[0]); item.PrimaryId = ids[0]; item.SecondaryId = ids[1]; item.ProductionTime = new DateTimeOffset(productionTimeTicks, TimeSpan.Zero); return(item); }
protected override void ReadValues( IDictionary <string, EntityProperty> properties, OperationContext operationContext) { var parts = PartitionKey.Split('|'); var group = parts[0]; var encodedName = parts[1]; var nameBytes = Convert.FromBase64String(encodedName); var name = Encoding.UTF8.GetString(nameBytes); Value.CategoryGroup = (CategoryGroup)Enum.Parse(typeof(CategoryGroup), group); Value.CategoryName = name; Value.ProfileId = Guid.Parse(RowKey); base.ReadValues(properties, operationContext); }
public string GetFeedName() { return(PartitionKey.Split(new[] { splitToken }, StringSplitOptions.None)[1]); }