I have an IReliableDictionary and you need to take elements in a dictionary and move them to IList in order to return from my reliable service.
It seems I can not do .ToList of any type, so I am sure that I am not mistaken.
public async Task<IList<CustomerOrderItem>> GetOrdersAsync()
{
IReliableDictionary<CustomerOrderItemId, CustomerOrderItem> orderItems =
await this.StateManager.GetOrAddAsync<IReliableDictionary<CustomerOrderItemId, CustomerOrderItem>>(CustomerOrderItemDictionaryName);
Dictionary<KeyValuePair<CustomerOrderItemId, CustomerOrderItem>, KeyValuePair<CustomerOrderItemId, CustomerOrderItem>> items = orderItems.ToDictionary(v => v);
IList<CustomerOrderItem> list = orderItems.ToList(); ???
...
}
Any ideas on how to take items from a dictionary and put them on a list?
source
share