Exemplo n.º 1
0
 public EntityInMemoryChangesProvider(IQuery query,
                                      IMemoryBasedDataObjectAccessor <TDataObject> memoryBasedDataObjectAccessor,
                                      IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _memoryBasedDataObjectAccessor = memoryBasedDataObjectAccessor;
     _dataChangesDetector           = new TwoPhaseDataChangesDetector <TDataObject>(equalityComparerFactory);
 }
Exemplo n.º 2
0
 public EntityChangesProvider(IQuery query,
                              IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                              IEqualityComparerFactory equalityComparerFactory)
 {
     _query = query;
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _dataChangesDetector            = new TwoPhaseDataChangesDetector <TDataObject>(equalityComparerFactory);
 }
 public EntityChangesProvider(IQuery query,
                              IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                              IEqualityComparerFactory equalityComparerFactory)
 {
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _dataChangesDetector            = new TwoPhaseDataChangesDetector <TDataObject>(
         specification => storageBasedDataObjectAccessor.GetSource().WhereMatched(specification),
         specification => query.For <TDataObject>().WhereMatched(specification),
         equalityComparerFactory.CreateIdentityComparer <TDataObject>(),
         equalityComparerFactory.CreateCompleteComparer <TDataObject>());
 }