public void Commit ( Enlistment enlistment )
    {
        resource.NumCommit++;
        if ( resource.FailCommit )
            return;

        resource.Commit ();
        enlistment.Done ();
    }
Example #2
0
        public void Commit(Enlistment enlistment)
        {
            resource.NumCommit++;
            if (resource.FailCommit)
            {
                if (resource.FailWithException)
                {
                    throw (resource.ThrowThisException ?? new NotSupportedException());
                }
                else
                {
                    return;
                }
            }

            resource.Commit();
            enlistment.Done();
        }