Beispiel #1
0
        /// <summary>
        ///     Serves as a hash function for a particular type.
        /// </summary>
        /// <returns>
        ///     A hash code for the current <see cref = "T:System.Object" />.
        /// </returns>
        /// <filterpriority>2</filterpriority>
        public override int GetHashCode()
        {
            ITransactionOptions self = this;

            unchecked
            {
                var result = IsolationLevel.GetHashCode();
                result = (result * 397) ^ Mode.GetHashCode();
                result = (result * 397) ^ self.Fork.GetHashCode();
                result = (result * 397) ^ self.Timeout.GetHashCode();
                result = (result * 397) ^ AsyncRollback.GetHashCode();
                result = (result * 397) ^ AsyncCommit.GetHashCode();
                return(result);
            }
        }
Beispiel #2
0
 /// <summary>
 ///     Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 ///     A hash code for the current <see cref = "T:System.Object" />.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         var result = IsolationLevel.GetHashCode();
         result = (result * 397) ^ Mode.GetHashCode();
         result = (result * 397) ^ Fork.GetHashCode();
         result = (result * 397) ^ Timeout.GetHashCode();
         result = (result * 397) ^ _CustomContext.GetHashCode();
         result = (result * 397) ^ AsyncRollback.GetHashCode();
         result = (result * 397) ^ AsyncCommit.GetHashCode();
         result = (result * 397) ^ DependentOption.GetHashCode();
         return(result);
     }
 }