Esempio n. 1
0
 public FileCompareStats(IFileMD5Stats stats, Guid groupID)
 {
     if (stats == null)
     {
         throw new ArgumentNullException("stats");
     }
     _md5     = (stats is FileMD5Stats) ? (FileMD5Stats)stats : new FileMD5Stats(stats.Length, stats.LengthLastVerifedUTC, stats.Checksum);
     _groupID = groupID;
 }
 public FileCompareStatsVerifiedMD5(IFileStats stats, byte[] checksum, Guid groupID, DateTime lastCompared)
 {
     _md5          = new FileMD5Stats(stats, checksum);
     _lastCompared = FileStats.NormalizeDateTime(lastCompared);
     if (_md5.LastCalculatedUTC.Equals(_lastCompared))
     {
         throw new InvalidOperationException("Last verified date must be different from last calculated date");
     }
     _groupID = groupID;
 }
 public FileCompareStatusReverified(FileMD5Stats stats, DateTime lastVerified, Guid groupID, DateTime lastCompared)
 {
     _md5          = new FileMD5StatsVerifiedLength(stats, lastVerified);
     _lastCompared = FileStats.NormalizeDateTime(lastCompared);
     if (_md5.LastCalculatedUTC.Equals(_lastCompared))
     {
         throw new InvalidOperationException("Calculated date must differ from verified and compared dates");
     }
     _groupID = groupID;
 }
 public FileCompareStatsVerifiedMD5(IFileCompareStats stats, DateTime lastCalculated)
 {
     if (stats == null)
     {
         throw new ArgumentNullException("stats");
     }
     _md5          = new FileMD5Stats(stats.Length, lastCalculated, stats.Checksum);
     _lastCompared = FileStats.NormalizeDateTime(stats.LastCompared);
     if (_md5.LastCalculatedUTC.Equals(_lastCompared))
     {
         throw new InvalidOperationException("Last verified date must be different from last calculated date");
     }
     _groupID = stats.GroupID;
 }
Esempio n. 5
0
 public FileCompareStats(IFileStats stats, byte[] checksum, Guid groupID)
 {
     _md5     = new FileMD5Stats(stats, checksum);
     _groupID = groupID;
 }
Esempio n. 6
0
 public FileCompareStats(long length, DateTime lastCompared, byte[] checksum, Guid groupID)
 {
     _md5     = new FileMD5Stats(length, lastCompared, checksum);
     _groupID = groupID;
 }