Beispiel #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((DataBaseInstance != null ? DataBaseInstance.GetHashCode() : 0) * 397) ^
                (Connection != null ? Connection.GetHashCode() : 0) ^
                (IsolationLevel.HasValue ? IsolationLevel.GetHashCode() : 0));
     }
 }
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()
        {
            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 #3
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);
     }
 }