/// <summary> /// Gets a unique-enough hash of this error. Stored as a quick comparison mechanism to roll-up duplicate errors. /// </summary> /// <param name="includeMachine">Whether to include <see cref="MachineName"/> in the has calculation, creating per-machine roll-ups.</param> /// <returns>A "Unique" hash for this error.</returns> public int?GetHash(bool includeMachine) { if (!Detail.HasValue()) { return(null); } var result = Detail.GetHashCode(); if (includeMachine && MachineName.HasValue()) { result = (result * 397) ^ MachineName.GetHashCode(); } return(result); }
/// <summary> /// Gets a unique-enough hash of this error. Stored as a quick comparison mehanism to rollup duplicate errors. /// </summary> /// <returns>"Unique" hash for this error</returns> private int?GetHash() { if (!Detail.HasValue()) { return(null); } var result = Detail.GetHashCode(); if (RollupPerServer && MachineName.HasValue()) { result = (result * 397) ^ MachineName.GetHashCode(); } return(result); }
/// <summary> /// Gets a unique-enough hash of this log item. Stored as a quick comparison mehanism to rollup duplicate log items. /// </summary> /// <returns>"Unique" hash for this log item</returns> public int?GetHash() { if (!Message.HasValue()) { return(null); } var result = Message.GetHashCode(); if (MachineName.HasValue()) { result = (result * 397) ^ MachineName.GetHashCode(); } return(result); }