Ejemplo n.º 1
0
        /// <summary>
        /// Use this constructor to control the tgTransactionScopeOption as it applies
        /// to this transaction.
        /// <code>
        /// using (tgTransactionScope scope = new
        ///   tgTransactionScope(tgTransactionScopeOption.RequiresNew, IsolationLevel.ReadCommitted))
        /// {
        ///		// Do your work here
        ///		scope.Complete();
        /// }
        /// </code>
        /// </summary>
        /// <param name="option">See <see cref="tgTransactionScopeOption"/></param>
        /// <param name="level">See IsolationLevel in the System.Data namespace</param>
        public tgTransactionScope(tgTransactionScopeOption option, IsolationLevel level)
        {
            this.option = option;
            this.level  = level;

            CommonInit(this);

            this.root.count++;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Use this constructor to control the tgTransactionScopeOption as it applies
        /// to this transaction.
        /// <code>
        /// using (tgTransactionScope scope = new tgTransactionScope(tgTransactionScopeOption.RequiresNew))
        /// {
        ///		// Do your work here
        ///		scope.Complete();
        /// }
        /// </code>
        /// </summary>
        /// <param name="option">See <see cref="tgTransactionScopeOption"/></param>
        public tgTransactionScope(tgTransactionScopeOption option)
        {
            if (option == tgTransactionScopeOption.None)
            {
                throw new ArgumentException("'None' cannot be passed");
            }

            this.option = option;
            this.level  = tgTransactionScope.IsolationLevel;

            CommonInit(this);

            this.root.count++;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Use this constructor to control the tgTransactionScopeOption as it applies
        /// to this transaction.
        /// <code>
        /// using (tgTransactionScope scope = new 
        ///   tgTransactionScope(tgTransactionScopeOption.RequiresNew, IsolationLevel.ReadCommitted))
        /// {
        ///		// Do your work here
        ///		scope.Complete();
        /// }
        /// </code>
        /// </summary>
        /// <param name="option">See <see cref="tgTransactionScopeOption"/></param>
        /// <param name="level">See IsolationLevel in the System.Data namespace</param>
        public tgTransactionScope(tgTransactionScopeOption option, IsolationLevel level)
        {
            this.option = option;
            this.level  = level;

            CommonInit(this);

            this.root.count++;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Use this constructor to control the tgTransactionScopeOption as it applies
        /// to this transaction.
        /// <code>
        /// using (tgTransactionScope scope = new tgTransactionScope(tgTransactionScopeOption.RequiresNew))
        /// {
        ///		// Do your work here
        ///		scope.Complete();
        /// }
        /// </code>
        /// </summary>
        /// <param name="option">See <see cref="tgTransactionScopeOption"/></param>
        public tgTransactionScope(tgTransactionScopeOption option)
        {
            if (option == tgTransactionScopeOption.None) throw new ArgumentException("'None' cannot be passed");

            this.option = option;
            this.level  = tgTransactionScope.IsolationLevel;

            CommonInit(this);

            this.root.count++;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// The default constructor, this transactions <see cref="tgTransactionScopeOption"/> will be
        /// set to Required. The IsolationLevel is set to Unspecified.
        /// <code>
        /// using (tgTransactionScope scope = new tgTransactionScope())
        /// {
        ///		// Do your work here
        ///		scope.Complete();
        /// }
        /// </code>
        /// </summary>
        public tgTransactionScope()
        {
            this.option = tgTransactionScopeOption.Required;
            this.level  = tgTransactionScope.IsolationLevel;

            CommonInit(this);

            this.root.count++;
        }