private bool disposedValue = false; // To detect redundant calls private void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // dispose managed state (managed objects). if (null != _response) { if (_response.StatementId != 0) { _connection.InternalCloseStatement(_response.StatementId); } _response = null; _connection = null; } } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }
internal PhoenixTransaction(PhoenixConnection connection, IsolationLevel il) { if (null == connection) { throw new ArgumentNullException(nameof(connection)); } this._connection = connection; this._phoneixTxIsoLevel = PhoenixIsolationLevelMap.GetPhoenixLevel(il); }
/// <summary> /// Initializes a new instance of the SqlBulkCopy class using the specified open instance of PhoenixConnection. /// </summary> /// <param name="connection"></param> public PhoenixBulkCopy(PhoenixConnection connection) { if (null == connection) { throw new ArgumentNullException(nameof(connection)); } this._connection = connection; this.ColumnMappings = new Dictionary <string, PhoenixBulkCopyColumnMapping>(); }
internal PhoenixDataReader(PhoenixConnection connection, ResultSetResponse response) { if (null == connection) { throw new ArgumentNullException(nameof(connection)); } if (null == response) { throw new ArgumentNullException(nameof(response)); } _connection = connection; GarudaResultSet grs = new GarudaResultSet(response.Signature, response.FirstFrame, response.UpdateCount); _resultSets.Add(grs); }
internal PhoenixDataReader(PhoenixCommand cmd, GarudaExecuteResponse response) { if (null == cmd) { throw new ArgumentNullException("cmd"); } if (null == response) { throw new ArgumentNullException("response"); } _connection = (PhoenixConnection)cmd.Connection; _statementId = response.StatementId; //_response = response.Response.Results.ToList(); _resultSets = new List <GarudaResultSet>(); foreach (var res in response.Response.Results) { GarudaResultSet grs = new GarudaResultSet(res.Signature, res.FirstFrame, res.UpdateCount); _resultSets.Add(grs); } }
/// <summary> /// Constructs a new instance of a PhoenixCommand class associated with the /// specified PhoenixConnection. /// </summary> /// <param name="connection"></param> public PhoenixCommand(PhoenixConnection connection) { this.CommandType = System.Data.CommandType.Text; this.Connection = connection; this.Parameters = new PhoenixParameterCollection(); }