public override bool Equals(object obj) {
// If parameter is null return false.
if (obj == null) {
return false;
}
// If parameter cannot be cast to MappedObjectData return false.
MappedObject p = obj as MappedObject;
if (p == null) {
return false;
}
// Return true if the fields match:
return object.Equals(this.ParentId, p.ParentId) &&
this.Type.Equals(p.Type) &&
object.Equals(this.RemoteObjectId, p.RemoteObjectId) &&
object.Equals(this.LastChangeToken, p.LastChangeToken) &&
object.Equals(this.LastRemoteWriteTimeUtc, p.LastRemoteWriteTimeUtc) &&
object.Equals(this.LastLocalWriteTimeUtc, p.LastLocalWriteTimeUtc) &&
object.Equals(this.ChecksumAlgorithmName, p.ChecksumAlgorithmName) &&
object.Equals(this.Name, p.Name) &&
object.Equals(this.Guid, p.Guid) &&
object.Equals(this.LastContentSize, p.LastContentSize) &&
object.Equals(this.Ignored, p.Ignored) &&
object.Equals(this.IsReadOnly, p.IsReadOnly) &&
((this.LastChecksum == null && p.LastChecksum == null) || (this.LastChecksum != null && p.LastChecksum != null && this.LastChecksum.SequenceEqual(p.LastChecksum)));
}