private static void PrintInventoryItems(IReliableDictionary <InventoryItemId, InventoryItem> inventoryItems) { ServiceEventSource.Current.Message("PRINTING INVENTORY"); Dictionary <KeyValuePair <InventoryItemId, InventoryItem>, KeyValuePair <InventoryItemId, InventoryItem> > items = inventoryItems.ToDictionary(v => v); foreach (KeyValuePair <KeyValuePair <InventoryItemId, InventoryItem>, KeyValuePair <InventoryItemId, InventoryItem> > tempitem in items) { ServiceEventSource.Current.Message("ID:{0}|Item:{1}", tempitem.Key, tempitem.Value); } }
private static void PrintInventoryItems(IReliableDictionary<InventoryItemId, InventoryItem> inventoryItems) { ServiceEventSource.Current.Message("PRINTING INVENTORY"); Dictionary<KeyValuePair<InventoryItemId, InventoryItem>, KeyValuePair<InventoryItemId, InventoryItem>> items = inventoryItems.ToDictionary(v => v); foreach (KeyValuePair<KeyValuePair<InventoryItemId, InventoryItem>, KeyValuePair<InventoryItemId, InventoryItem>> tempitem in items) { ServiceEventSource.Current.Message("ID:{0}|Item:{1}", tempitem.Key, tempitem.Value); } }