public TwoPhaseDataChangesDetector(
     MapToObjectsSpecProvider <T, T> sourceProvider,
     MapToObjectsSpecProvider <T, T> targetProvider,
     IEqualityComparer <T> identityComparer,
     IEqualityComparer <T> completeComparer)
 {
     _dataChangesDetector = new DataChangesDetector <T>(sourceProvider, targetProvider, completeComparer);
     _identityComparer    = identityComparer;
 }
 public ValueObjectChangesProvider(IQuery query,
                                   IStorageBasedDataObjectAccessor <TDataObject> storageBasedDataObjectAccessor,
                                   IEqualityComparerFactory equalityComparerFactory)
 {
     _storageBasedDataObjectAccessor = storageBasedDataObjectAccessor;
     _dataChangesDetector            = new DataChangesDetector <TDataObject>(
         specification => storageBasedDataObjectAccessor.GetSource().WhereMatched(specification),
         specification => query.For <TDataObject>().WhereMatched(specification),
         equalityComparerFactory.CreateCompleteComparer <TDataObject>());
 }