protected virtual bool ShouldItemBeCopied(MessageRec sourceMR, MessageRec targetMR, HashSet <byte[]> duplicateTargetSecondaryKeys)
        {
            if (targetMR == null)
            {
                return(true);
            }
            if (!sourceMR.IsFAI && this.conflictResolutionOption == ConflictResolutionOption.KeepAll)
            {
                return(false);
            }
            DateTime dateTimeValue  = FolderContentsMapper.GetDateTimeValue(sourceMR, PropTag.LastModificationTime);
            DateTime dateTimeValue2 = FolderContentsMapper.GetDateTimeValue(targetMR, this.destHierarchy.SourceLastModifiedTimestampPtag);
            DateTime dateTimeValue3 = FolderContentsMapper.GetDateTimeValue(targetMR, PropTag.LastModificationTime);

            return(dateTimeValue != dateTimeValue2 && (this.conflictResolutionOption != ConflictResolutionOption.KeepLatestItem || !(dateTimeValue <= dateTimeValue3)));
        }
 private byte[] GetKeyPlusLMTHash(MessageRec mr, PropTag keyPtag, PropTag lmtPtag)
 {
     byte[] array = ((keyPtag == PropTag.EntryId) ? mr.EntryId : mr[keyPtag]) as byte[];
     if (array == null)
     {
         return(null);
     }
     if (this.conflictResolutionOption != ConflictResolutionOption.KeepAll)
     {
         return(array);
     }
     byte[] bytes  = BitConverter.GetBytes(FolderContentsMapper.GetDateTimeValue(mr, lmtPtag).ToBinary());
     byte[] array2 = new byte[array.Length + bytes.Length];
     array.CopyTo(array2, 0);
     bytes.CopyTo(array2, array.Length);
     return(array2);
 }