CmisSync.Lib.Storage.Database.Entities.FileTransmissionObject.GetHashCode C# (CSharp) Method

GetHashCode() public method

Serves as a hash function for a CmisSync.Lib.Storage.Database.Entities.FileTransmissionObject object.
public GetHashCode ( ) : int
return int
        public override int GetHashCode() {
            int localPath = (this.LocalPath ?? string.Empty).GetHashCode();
            int checksumName = (this.ChecksumAlgorithmName ?? string.Empty).GetHashCode();
            int lastlocalwritetime = this.LastLocalWriteTimeUtc.GetValueOrDefault().GetHashCode();
            int remoteId = (this.RemoteObjectId ?? string.Empty).GetHashCode();
            int changeToken = (this.LastChangeToken ?? string.Empty).GetHashCode();
            int lastremotewritetime = this.LastRemoteWriteTimeUtc.GetValueOrDefault().GetHashCode();

            // This is really slow. If it is a problem, choose another way to calculate hash code
            return string.Format("{0}-{1}-{2}-{3}-{4}-{5}", localPath, checksumName, lastlocalwritetime, remoteId, changeToken, lastremotewritetime).GetHashCode();
        }
    }