private CallStack createdAt; // The stack at the time the context was created #endif /// <summary> /// Initializes the context with the connection string passed. /// </summary> /// <param name="connectionString">The connection string.</param> /// <remarks> /// See the .NET Framework documentation for information on the format /// of this parameter. /// </remarks> public SqlContext(string connectionString) { this.conString = connectionString; this.sqlCon = null; this.sqlTrans = null; this.transactions = new Stack(); this.nextSavePoint = 0; this.onStdError = null; this.retrying = false; this.isSqlAzure = null; #if TRACK this.lastCommand = string.Empty; this.createdAt = new CallStack(1, true); if (!traceWarning) { SysLog.LogWarning("LillTek.Data.SqlContext TRACE enabled."); traceWarning = true; } #endif }
/// <summary> /// Initializes the context with the connection string passed /// and StdErrorCreateDelegate instance passed. /// </summary> /// <param name="connectionString">The connection string.</param> /// <param name="onStdError">The StdError exception factory.</param> /// <remarks> /// See the .NET Framework documentation for information on the format /// of this parameter. /// </remarks> public SqlContext(string connectionString, StdErrorCreateDelegate onStdError) : this(connectionString) { this.onStdError = onStdError; }