protected override void Dispose(bool disposing) { if (!_disposed) { if (disposing) { try { if (_state != TransactionState.NoTransaction) { Rollback(); } } catch { } finally { if (disposing) { _db = null; _handle.Dispose(); _state = TransactionState.NoTransaction; _statusVector = null; } _disposed = true; base.Dispose(disposing); } } } }
protected override void Dispose(bool disposing) { if (!_disposed) { try { if (disposing) { Release(); Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; _outputParams = null; _statusVector = null; _allRowsFetched = false; _state = StatementState.Deallocated; _statementType = DbStatementType.None; _recordsAffected = 0; _handle.Dispose(); FetchSize = 0; } } finally { _disposed = true; base.Dispose(disposing); } } }
private void Dispose(bool disposing) { lock (this) { if (!this.disposed) { try { // release any unmanaged resources this.Rollback(); } catch { } finally { // release any managed resources if (disposing) { this.db = null; this.handle = 0; this.state = TransactionState.NoTransaction; this.statusVector = null; } this.disposed = true; } } } }
public FesTransaction(IDatabase db) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } _db = (FesDatabase)db; _state = TransactionState.NoTransaction; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public FesTransaction(IDatabase db) { if (!(db is FesDatabase)) { throw new ArgumentException($"Specified argument is not of {nameof(FesDatabase)} type."); } _db = (FesDatabase)db; _handle = new TransactionHandle(); _state = TransactionState.NoTransaction; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public FesTransaction(IDatabase db) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } this.db = (FesDatabase)db; this.state = TransactionState.NoTransaction; this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; GC.SuppressFinalize(this); }
public FesArray(DatabaseBase db, TransactionBase transaction, long handle, string tableName, string fieldName) : base(tableName, fieldName) { if (!(db is FesDatabase)) { throw new ArgumentException($"Specified argument is not of {nameof(FesDatabase)} type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException($"Specified argument is not of {nameof(FesTransaction)} type."); } _db = (FesDatabase)db; _transaction = (FesTransaction)transaction; _handle = handle; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public override async ValueTask Dispose2Async(CancellationToken cancellationToken = default) { if (!_disposed) { _disposed = true; if (State != TransactionState.NoTransaction) { await RollbackAsync(cancellationToken).ConfigureAwait(false); } _db = null; _handle.Dispose(); State = TransactionState.NoTransaction; _statusVector = null; await base.Dispose2Async(cancellationToken).ConfigureAwait(false); } }
public override async Task Dispose2(AsyncWrappingCommonArgs async) { if (!_disposed) { _disposed = true; if (State != TransactionState.NoTransaction) { await Rollback(async).ConfigureAwait(false); } _db = null; _handle.Dispose(); State = TransactionState.NoTransaction; _statusVector = null; await base.Dispose2(async).ConfigureAwait(false); } }
public override void Dispose() { if (!_disposed) { _disposed = true; if (_state != TransactionState.NoTransaction) { Rollback(); } _db = null; _handle.Dispose(); _state = TransactionState.NoTransaction; _statusVector = null; base.Dispose(); } }
public FesStatement(DatabaseBase db, TransactionBase transaction) { if (!(db is FesDatabase)) { throw new ArgumentException($"Specified argument is not of {nameof(FesDatabase)} type."); } _db = (FesDatabase)db; _handle = new StatementHandle(); OutputParameters = new Queue <DbValue[]>(); _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; _fetchSqlDa = IntPtr.Zero; if (transaction != null) { Transaction = transaction; } }
public override void Dispose2() { if (!_disposed) { _disposed = true; Release(); Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; OutputParameters = null; _statusVector = null; _allRowsFetched = false; _handle.Dispose(); FetchSize = 0; base.Dispose2(); } }
public FesBlob(IDatabase db, ITransaction transaction, long blobId) : base(db) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException("Specified argument is not of FesTransaction type."); } _db = (FesDatabase)db; _transaction = (FesTransaction)transaction; _position = 0; _blobHandle = 0; _blobId = blobId; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public FesBlob(IDatabase db, ITransaction transaction, long blobId) : base(db) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException("Specified argument is not of FesTransaction type."); } this.db = (FesDatabase)db; this.transaction = (FesTransaction)transaction; this.position = 0; this.blobHandle = 0; this.blobId = blobId; this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public FesStatement(IDatabase db, TransactionBase transaction) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } _recordsAffected = -1; _db = (FesDatabase)db; _handle = new StatementHandle(); _outputParams = new Queue(); _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; _fetchSqlDa = IntPtr.Zero; if (transaction != null) { Transaction = transaction; } }
public FesBlob(IDatabase db, TransactionBase transaction, long blobId) : base(db) { if (!(db is FesDatabase)) { throw new ArgumentException($"Specified argument is not of {nameof(FesDatabase)} type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException($"Specified argument is not of {nameof(FesTransaction)} type."); } _db = (FesDatabase)db; _transaction = (FesTransaction)transaction; _position = 0; _blobHandle = new BlobHandle(); _blobId = blobId; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; }
public void Attach(ServiceParameterBuffer spb, string dataSource, int port, string service, byte[] cryptKey) { FesDatabase.CheckCryptKeyForSupport(cryptKey); ClearStatusVector(); var svcHandle = Handle; _fbClient.isc_service_attach( _statusVector, (short)service.Length, service, ref svcHandle, spb.Length, spb.ToArray()); ProcessStatusVector(_statusVector); _handle = svcHandle; }
public override async Task Dispose2(AsyncWrappingCommonArgs async) { if (!_disposed) { _disposed = true; await Release(async).ConfigureAwait(false); Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; OutputParameters = null; _statusVector = null; _allRowsFetched = false; _handle.Dispose(); FetchSize = 0; await base.Dispose2(async).ConfigureAwait(false); } }
public FesStatement(IDatabase db, ITransaction transaction) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } this.recordsAffected = -1; this.db = (FesDatabase)db; this.outputParams = new Queue(); this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; this.fetchSqlDa = IntPtr.Zero; if (transaction != null) { this.Transaction = transaction; } GC.SuppressFinalize(this); }
public override async ValueTask Dispose2Async(CancellationToken cancellationToken = default) { if (!_disposed) { _disposed = true; await ReleaseAsync(cancellationToken).ConfigureAwait(false); Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; OutputParameters = null; _statusVector = null; _allRowsFetched = false; _handle.Dispose(); FetchSize = 0; await base.Dispose2Async(cancellationToken).ConfigureAwait(false); } }
public override ValueTask AttachAsync(ServiceParameterBufferBase spb, string dataSource, int port, string service, byte[] cryptKey, CancellationToken cancellationToken = default) { FesDatabase.CheckCryptKeyForSupport(cryptKey); ClearStatusVector(); var svcHandle = Handle; _fbClient.isc_service_attach( _statusVector, (short)service.Length, service, ref svcHandle, spb.Length, spb.ToArray()); ProcessStatusVector(_statusVector); Handle = svcHandle; return(ValueTask2.CompletedTask); }
public override Task Attach(ServiceParameterBuffer spb, string dataSource, int port, string service, byte[] cryptKey, AsyncWrappingCommonArgs async) { FesDatabase.CheckCryptKeyForSupport(cryptKey); ClearStatusVector(); var svcHandle = Handle; _fbClient.isc_service_attach( _statusVector, (short)service.Length, service, ref svcHandle, spb.Length, spb.ToArray()); ProcessStatusVector(_statusVector); Handle = svcHandle; return(Task.CompletedTask); }
public FesArray( IDatabase db, ITransaction transaction, long handle, string tableName, string fieldName) : base(tableName, fieldName) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of GdsDatabase type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException("Specified argument is not of GdsTransaction type."); } this.db = (FesDatabase)db; this.transaction = (FesTransaction)transaction; this.handle = handle; this.statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; this.LookupBounds(); }
public FesArray( IDatabase db, ITransaction transaction, long handle, string tableName, string fieldName) : base(tableName, fieldName) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of GdsDatabase type."); } if (!(transaction is FesTransaction)) { throw new ArgumentException("Specified argument is not of GdsTransaction type."); } _db = (FesDatabase)db; _transaction = (FesTransaction)transaction; _handle = handle; _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; LookupBounds(); }
protected override void Dispose(bool disposing) { if (!IsDisposed) { try { // release any unmanaged resources Release(); } catch { } finally { // release any managed resources if (disposing) { Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; _outputParams = null; _statusVector = null; _allRowsFetched = false; _state = StatementState.Deallocated; _statementType = DbStatementType.None; _recordsAffected = 0; _handle = 0; FetchSize = 0; } base.Dispose(disposing); } } }
protected override void Dispose(bool disposing) { if (!this.IsDisposed) { try { // release any unmanaged resources this.Release(); } catch { } finally { // release any managed resources if (disposing) { this.Clear(); this.db = null; this.fields = null; this.parameters = null; this.transaction = null; this.outputParams = null; this.statusVector = null; this.allRowsFetched = false; this.state = StatementState.Deallocated; this.statementType = DbStatementType.None; this.recordsAffected = 0; this.handle = 0; this.FetchSize = 0; } base.Dispose(disposing); } } }
public FesStatement(IDatabase db, ITransaction transaction) { if (!(db is FesDatabase)) { throw new ArgumentException("Specified argument is not of FesDatabase type."); } _recordsAffected = -1; _db = (FesDatabase)db; _outputParams = new Queue(); _statusVector = new IntPtr[IscCodes.ISC_STATUS_LENGTH]; _fetchSqlDa = IntPtr.Zero; if (transaction != null) { Transaction = transaction; } }
private void Dispose(bool disposing) { lock (this) { if (!_disposed) { try { Rollback(); } catch { } finally { if (disposing) { _db = null; _handle = 0; _state = TransactionState.NoTransaction; _statusVector = null; } _disposed = true; } } } }
protected override void Dispose(bool disposing) { if (!IsDisposed) { try { Release(); } catch { } finally { if (disposing) { Clear(); _db = null; _fields = null; _parameters = null; _transaction = null; _outputParams = null; _statusVector = null; _allRowsFetched = false; _state = StatementState.Deallocated; _statementType = DbStatementType.None; _recordsAffected = 0; _handle = 0; FetchSize = 0; } base.Dispose(disposing); } } }