CmisSync.Lib.Storage.Database.Entities.MappedObject.Equals C# (CSharp) Method

Equals() public method

Determines whether the specified System.Object is equal to the current CmisSync.Lib.Data.MappedObjectData.
public Equals ( object obj ) : bool
obj object /// The to compare with the current . ///
return bool
        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)));
        }