Beispiel #1
0
        protected IAsyncResult BeginCommitInternal(AsyncCallback callback)
        {
            if (committed || committing)
            {
                throw new InvalidOperationException("Commit has already been called for this transaction.");
            }

            this.committing = true;

            asyncCommit = new AsyncCommit(DoCommit);
            return(asyncCommit.BeginInvoke(callback, null));
        }
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);
     }
 }
Beispiel #4
0
		protected IAsyncResult BeginCommitInternal (AsyncCallback callback)
		{
			if (committed || committing)
				throw new InvalidOperationException ("Commit has already been called for this transaction.");

			this.committing = true;

			asyncCommit = new AsyncCommit (DoCommit);
			return asyncCommit.BeginInvoke (callback, null);
		}