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(IFileMD5Stats stats, Guid groupID, DateTime lastCompared) { if (stats == null) { throw new ArgumentNullException("stats"); } _md5 = (stats is FileMD5Stats) ? (FileMD5Stats)stats : new FileMD5Stats(stats.Length, stats.LengthLastVerifedUTC, 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 FileMD5StatsVerifiedLength(IFileMD5Stats stats, DateTime lastVerified) { if (stats == null) { throw new ArgumentNullException("stats"); } _fileStats = new FileStats(stats.Length, lastVerified); _lastCalculated = FileStats.NormalizeDateTime(stats.LastCalculatedUTC); if (_fileStats.LengthLastVerifedUTC.Equals(_lastCalculated)) { throw new InvalidOperationException("Last calculated date must be different than the last verified date"); } _checksum = stats.Checksum; }
public bool Equals(IFileMD5Stats other) => other != null && other is FileCompareStatsVerifiedMD5 && Equals((FileCompareStatsVerifiedMD5)other);
public bool Equals(IFileMD5Stats other) => other != null && other is FileCompareStatusReverified && Equals((FileCompareStatusReverified)other);
public bool Equals(IFileMD5Stats other) => other != null && other is FileMD5Stats && Equals((FileMD5Stats)other);
public bool Equals(IFileMD5Stats other) => other != null && other is FileMD5StatsVerifiedLength && Equals((FileMD5StatsVerifiedLength)other);