In a WPF project I've a shared class called OrderHoder which is simething as
Dictionary<int,OrderBase> OrderList {get;set;}
This dictionary is filled realtime with new data, updates,deletes and so on via a TCP connection and a supersocket-based library.
I've 4 different views that display a Gridview based on a specific type of OrderBase
public class ForeignOrders: OrderBase
{ omiss}
I wish to have each gridview to get data from that OrderHolder based on a property defined in OrderBase so for ForeignView I've only the items of type ForeignOrder
For the initial load I've got no problem since I use a LINQ query to extract data
OrderList.Select(x=>x.Type == "foreign").ToList()
but this leads me to a problem : I can't get aware that way of OrderList modifications .
Is there a way I can have a projection of a Dictionary so that I can catch the updates/insert/delete?
Before you ask I can't just use a List since I have to know on update/delete what item to change and I can't do a
var idx = OrderList.IndexOf(x=>x.Id = 1234)
OrderList.ElementAt(idx) = [newItem]
I forgot to say It's on a WPF application that uses caliburn micro