Пример #1
0
        public virtual TransactionBase BeginTransaction(TransactionParameterBuffer tpb)
        {
            var transaction = new GdsTransaction(this);

            transaction.BeginTransaction(tpb);

            return(transaction);
        }
Пример #2
0
        public override async Task <TransactionBase> BeginTransaction(TransactionParameterBuffer tpb, AsyncWrappingCommonArgs async)
        {
            var transaction = new GdsTransaction(this);

            await transaction.BeginTransaction(tpb, async).ConfigureAwait(false);

            return(transaction);
        }
Пример #3
0
        public override async ValueTask <TransactionBase> BeginTransactionAsync(TransactionParameterBuffer tpb, CancellationToken cancellationToken = default)
        {
            var transaction = new GdsTransaction(this);

            await transaction.BeginTransactionAsync(tpb, cancellationToken).ConfigureAwait(false);

            return(transaction);
        }
        public GdsArray(DatabaseBase db, TransactionBase transaction, long handle, string tableName, string fieldName)
            : base(tableName, fieldName)
        {
            if (!(db is GdsDatabase))
            {
                throw new ArgumentException($"Specified argument is not of {nameof(GdsDatabase)} type.");
            }

            if (!(transaction is GdsTransaction))
            {
                throw new ArgumentException($"Specified argument is not of {nameof(GdsTransaction)} type.");
            }

            _database    = (GdsDatabase)db;
            _transaction = (GdsTransaction)transaction;
            _handle      = handle;
        }
Пример #5
0
 public override void Dispose()
 {
     if (!_disposed)
     {
         _disposed = true;
         Release();
         Clear();
         _rows           = null;
         _outputParams   = null;
         _database       = null;
         _fields         = null;
         _parameters     = null;
         _transaction    = null;
         _allRowsFetched = false;
         _handle         = 0;
         _fetchSize      = 0;
         base.Dispose();
     }
 }
Пример #6
0
        public GdsArray(IDatabase db, ITransaction transaction, long handle, string tableName, string fieldName)
            : base(tableName, fieldName)
        {
            if (!(db is GdsDatabase))
            {
                throw new ArgumentException("Specified argument is not of GdsDatabase type.");
            }

            if (!(transaction is GdsTransaction))
            {
                throw new ArgumentException("Specified argument is not of GdsTransaction type.");
            }

            this.database				= (GdsDatabase)db;
            this.transaction	= (GdsTransaction)transaction;
            this.handle			= handle;

            this.LookupBounds();
        }
Пример #7
0
        public GdsArray(IDatabase db, ITransaction transaction, long handle, string tableName, string fieldName)
            : base(tableName, fieldName)
        {
            if (!(db is GdsDatabase))
            {
                throw new ArgumentException("Specified argument is not of GdsDatabase type.");
            }

            if (!(transaction is GdsTransaction))
            {
                throw new ArgumentException("Specified argument is not of GdsTransaction type.");
            }

            this.database    = (GdsDatabase)db;
            this.transaction = (GdsTransaction)transaction;
            this.handle      = handle;

            this.LookupBounds();
        }
        public override async Task Dispose2(AsyncWrappingCommonArgs async)
        {
            if (!_disposed)
            {
                _disposed = true;
                await Release(async).ConfigureAwait(false);

                Clear();
                _rows            = null;
                OutputParameters = null;
                _database        = null;
                _fields          = null;
                _parameters      = null;
                _transaction     = null;
                _allRowsFetched  = false;
                _handle          = 0;
                _fetchSize       = 0;
                await base.Dispose2(async).ConfigureAwait(false);
            }
        }
Пример #9
0
        protected override void Dispose(bool disposing)
        {
            lock (this)
            {
                if (!this.IsDisposed)
                {
                    try
                    {
                        // release any unmanaged resources
                        this.Release();
                    }
                    catch
                    {
                    }
                    finally
                    {
                        // release any managed resources
                        if (disposing)
                        {
                            this.Clear();

                            this.rows            = null;
                            this.outputParams    = null;
                            this.database        = null;
                            this.fields          = null;
                            this.parameters      = null;
                            this.transaction     = null;
                            this.allRowsFetched  = false;
                            this.state           = StatementState.Deallocated;
                            this.statementType   = DbStatementType.None;
                            this.handle          = 0;
                            this.fetchSize       = 0;
                            this.RecordsAffected = 0;
                        }

                        base.Dispose(disposing);
                    }
                }
            }
        }
        protected override void Dispose(bool disposing)
        {
            lock (this)
            {
                if (!IsDisposed)
                {
                    try
                    {
                        // release any unmanaged resources
                        Release();
                    }
                    catch
                    {
                    }
                    finally
                    {
                        // release any managed resources
                        if (disposing)
                        {
                            Clear();

                            _rows           = null;
                            _outputParams   = null;
                            _database       = null;
                            _fields         = null;
                            _parameters     = null;
                            _transaction    = null;
                            _allRowsFetched = false;
                            _state          = StatementState.Deallocated;
                            _statementType  = DbStatementType.None;
                            _handle         = 0;
                            _fetchSize      = 0;
                            RecordsAffected = 0;
                        }

                        base.Dispose(disposing);
                    }
                }
            }
        }
Пример #11
0
 public override void Dispose()
 {
     if (!_disposed)
     {
         _disposed = true;
         Release();
         Clear();
         _rows           = null;
         _outputParams   = null;
         _database       = null;
         _fields         = null;
         _parameters     = null;
         _transaction    = null;
         _allRowsFetched = false;
         _state          = StatementState.Deallocated;
         _statementType  = DbStatementType.None;
         _handle         = 0;
         _fetchSize      = 0;
         RecordsAffected = 0;
         base.Dispose();
     }
 }
Пример #12
0
		protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!this.IsDisposed)
				{
					try
					{
						// release any unmanaged resources
						this.Release();
					}
					catch
					{
					}
					finally
					{
						// release any managed resources
						if (disposing)
						{
							this.Clear();

							this.rows               = null;
							this.outputParams       = null;
							this.database           = null;
							this.fields             = null;
							this.parameters         = null;
							this.transaction        = null;
							this.allRowsFetched     = false;
							this.state              = StatementState.Deallocated;
							this.statementType      = DbStatementType.None;
							this.handle             = 0;
							this.fetchSize          = 0;
							this.RecordsAffected    = 0;
						}
						
						base.Dispose(disposing);
					}
				}
			}
		}
Пример #13
0
        public virtual ITransaction BeginTransaction(TransactionParameterBuffer tpb)
        {
            GdsTransaction transaction = new GdsTransaction(this);

            transaction.BeginTransaction(tpb);

            return transaction;
        }
		protected override void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!IsDisposed)
				{
					try
					{
						Release();
					}
					catch
					{ }
					finally
					{
						if (disposing)
						{
							Clear();

							_rows = null;
							_outputParams = null;
							_database = null;
							_fields = null;
							_parameters = null;
							_transaction = null;
							_allRowsFetched = false;
							_state = StatementState.Deallocated;
							_statementType = DbStatementType.None;
							_handle = 0;
							_fetchSize = 0;
							RecordsAffected = 0;
						}

						base.Dispose(disposing);
					}
				}
			}
		}