/// <summary> /// Use this constructor to control the esTransactionScopeOption as it applies /// to this transaction. /// <code> /// using (esTransactionScope scope = new /// esTransactionScope(esTransactionScopeOption.RequiresNew, IsolationLevel.ReadCommitted)) /// { /// // Do your work here /// scope.Complete(); /// } /// </code> /// </summary> /// <param name="option">See <see cref="esTransactionScopeOption"/></param> /// <param name="level">See IsolationLevel in the System.Data namespace</param> public esTransactionScope(esTransactionScopeOption option, IsolationLevel level) { this.option = option; this.level = level; CommonInit(this); this.root.count++; }
/// <summary> /// Use this constructor to control the esTransactionScopeOption as it applies /// to this transaction. /// <code> /// using (esTransactionScope scope = new esTransactionScope(esTransactionScopeOption.RequiresNew)) /// { /// // Do your work here /// scope.Complete(); /// } /// </code> /// </summary> /// <param name="option">See <see cref="esTransactionScopeOption"/></param> public esTransactionScope(esTransactionScopeOption option) { if (option == esTransactionScopeOption.None) { throw new ArgumentException("'None' cannot be passed"); } this.option = option; this.level = esTransactionScope.IsolationLevel; CommonInit(this); this.root.count++; }
/// <summary> /// Use this constructor to control the esTransactionScopeOption as it applies /// to this transaction. /// <code> /// using (esTransactionScope scope = new esTransactionScope(esTransactionScopeOption.RequiresNew)) /// { /// // Do your work here /// scope.Complete(); /// } /// </code> /// </summary> /// <param name="option">See <see cref="esTransactionScopeOption"/></param> public esTransactionScope(esTransactionScopeOption option) { if (option == esTransactionScopeOption.None) throw new ArgumentException("'None' cannot be passed"); this.option = option; this.level = esTransactionScope.IsolationLevel; CommonInit(this); this.root.count++; }