public override int GetHashCode() { return (FileID?.GetHashCode() ?? 0 ^ FileLength.GetHashCode() ^ FileName?.GetHashCode() ?? 0 ^ FileShardIDs?.GetHashCodeEnumerable() ?? 0 ^ FileShardHashes?.GetHashCodeEnumerable() ?? 0 ^ LastModified.GetHashCode() ^ SHA1?.GetHashCode() ?? 0); }
public bool Equals(File other) { if (EqualsPreamble(other) == false) { return(false); } return (string.Equals(FileID, other.FileID, StringComparison.OrdinalIgnoreCase) && FileLength == other.FileLength && string.Equals(FileName, other.FileName, StringComparison.Ordinal) && FileShardIDs.ScrambledEquals(other.FileShardIDs) && FileShardHashes.ScrambledEquals(other.FileShardHashes) && LastModified == other.LastModified && string.Equals(SHA1, other.SHA1, StringComparison.OrdinalIgnoreCase)); }