Ejemplo n.º 1
0
 internal ChangeTrackingCollectionInterceptor(IList <T> target, bool makeComplexPropertiesTrackable, bool makeCollectionPropertiesTrackable)
 {
     _MakeComplexPropertiesTrackable    = makeComplexPropertiesTrackable;
     _MakeCollectionPropertiesTrackable = makeCollectionPropertiesTrackable;
     for (int i = 0; i < target.Count; i++)
     {
         target[i] = target[i].AsTrackable(ChangeStatus.Unchanged, ItemCanceled, _MakeComplexPropertiesTrackable, _MakeCollectionPropertiesTrackable);
     }
     _WrappedTarget = new ChangeTrackingBindingList <T>(target, DeleteItem, ItemCanceled, _MakeComplexPropertiesTrackable, _MakeCollectionPropertiesTrackable);
     _DeletedItems  = new List <T>();
 }
Ejemplo n.º 2
0
 internal ChangeTrackingCollectionInterceptor(IList <T> target, ChangeTrackingSettings changeTrackingSettings, Graph graph)
 {
     _ChangeTrackingSettings = changeTrackingSettings;
     _Graph = graph;
     for (int i = 0; i < target.Count; i++)
     {
         target[i] = ChangeTrackingFactory.Default.AsTrackable(target[i], ChangeStatus.Unchanged, ItemCanceled, _ChangeTrackingSettings, _Graph);
     }
     _WrappedTarget = new ChangeTrackingBindingList <T>(target, DeleteItem, ItemCanceled, _ChangeTrackingSettings, _Graph);
     _DeletedItems  = new List <T>();
 }