private void RefreshSerializableSources() { SerializableSources.Clear(); foreach (MigrationSource source in MigrationSources) { SerializableSources.Add(new SerializableSource(source, MigrationSources, Sessions, this)); } }
void MigrationSources_ItemAdded(IDualNotifyingCollection <MigrationSource> sender, ItemAddedEventArgs <MigrationSource> eventArgs) { eventArgs.Item.PropertyChanged += new UndoablePropertyChangedEventHandler(configurationSource_PropertyChanged); SerializableSources.Add(new SerializableSource(eventArgs.Item, MigrationSources, Sessions, this)); }
void MigrationSources_ItemRemoved(IDualNotifyingCollection <MigrationSource> sender, ItemRemovedEventArgs <MigrationSource> eventArgs) { SerializableSources.Remove(SerializableSources.First(x => x.Model == eventArgs.Item)); }