public override int GetHashCode() { int hash = 1; if (Api.Length != 0) { hash ^= Api.GetHashCode(); } if (Sid.Length != 0) { hash ^= Sid.GetHashCode(); } if (Uid.Length != 0) { hash ^= Uid.GetHashCode(); } if (Key.Length != 0) { hash ^= Key.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { unchecked { int hashCode = Code.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Context; hashCode = (hashCode * 397) ^ (Sid != null ? Sid.GetHashCode() : 0); return(hashCode); } }
/// <summary> /// Gets the hash code for the persistable object. /// </summary> /// <returns> /// The hash code. /// </returns> public override int GetHashCode() { // If we have a surrogate id then return its hash... if (EqualityComparer <TSurrogateIdentity> .Default.Equals(Sid, default(TSurrogateIdentity)) == false) { return(Sid.GetHashCode()); } // Cast ourselves as a keyed object... var keyedObject = this as IKeyed; // If we are keyed then return the key hash... if (keyedObject != null && string.IsNullOrEmpty(keyedObject.Key) == false) { return(keyedObject.Key.GetHashCode()); } return(base.GetHashCode()); }
/// <summary> /// Gets the hash code for the persistable object. /// </summary> /// <returns>The hash code.</returns> public override int GetHashCode() { // Cast ourselves as a keyed object... var keyedObject = this as IKeyed; // If we are keyed then return the key hash... if (keyedObject != null && string.IsNullOrEmpty(keyedObject.Key) == false) { return(keyedObject.Key.GetHashCode()); } // If we're not transient then return the hash of our surrogate id... if (IsTransient.IsFalse()) { return(Sid.GetHashCode()); } return(base.GetHashCode()); }
public override int GetHashCode() { int hash = 1; if (localOrGlobalCase_ == LocalOrGlobalOneofCase.Nid) { hash ^= Nid.GetHashCode(); } if (localOrGlobalCase_ == LocalOrGlobalOneofCase.Sid) { hash ^= Sid.GetHashCode(); } hash ^= (int)localOrGlobalCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { return(Sid?.GetHashCode() ?? 0); }
public override int GetHashCode() { return(Sid.GetHashCode()); }