private void HandleChange(object sender, NotifyCollectionChangedEventArgs e) { foreach (var x in e.NewItems) { // do something System.Console.WriteLine("Invoking the Call to the Module Host API"); DataItemCall call = x as DataItemCall; this._moduleHost.PostOutputDataItems(call.Item, HandleDataItemAcknowledgement, new object()); } foreach (var y in e.OldItems) { //do something } if (e.Action == NotifyCollectionChangedAction.Move) { //do something } }
public void AddNewDataItem(DataItemCall item) { postOperations.Add(item); }