예제 #1
0
        protected override void Dispose(bool disposing)
        {
            if (!this.IsDisposed)
            {
                try
                {
                    // release any unmanaged resources
                    this.Release();

                    // release any managed resources
                    if (disposing)
                    {
                        this.Clear();

                        this.db              = null;
                        this.fields          = null;
                        this.parameters      = null;
                        this.transaction     = null;
                        this.outputParams    = null;
                        this.allRowsFetched  = false;
                        this.recordsAffected = 0;
                        this.state           = StatementState.Deallocated;
                        this.handle          = 0;
                    }
                }
                finally
                {
                    base.Dispose(disposing);
                }
            }
        }
예제 #2
0
        private void Dispose(bool disposing)
        {
            lock (this)
            {
                if (!this.disposed)
                {
                    try
                    {
                        // release any unmanaged resources
                        this.Rollback();

                        // release any managed resources
                        if (disposing)
                        {
                            this.db     = null;
                            this.handle = 0;
                            this.state  = TransactionState.NoTransaction;
                        }
                    }
                    finally
                    {
                        this.disposed = true;
                    }
                }
            }
        }
		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;

			GC.SuppressFinalize(this);
		}
예제 #4
0
        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;

            GC.SuppressFinalize(this);
        }
예제 #5
0
파일: FesBlob.cs 프로젝트: raj581/Marvin
        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;
        }
예제 #6
0
		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;
		}
예제 #7
0
        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();

            if (transaction != null)
            {
                this.Transaction = transaction;
            }

            GC.SuppressFinalize(this);
        }
예제 #8
0
        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.LookupBounds();
        }
		private void Dispose(bool disposing)
		{
			lock (this)
			{
				if (!this.disposed)
				{
					try
					{
						// release any unmanaged resources
						this.Rollback();

						// release any managed resources
						if (disposing)
						{
							this.db = null;
							this.handle = 0;
							this.state = TransactionState.NoTransaction;
						}
					}
					finally
					{
						this.disposed = true;
					}
				}
			}
		}
예제 #10
0
		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.LookupBounds();
		}
예제 #11
0
		protected override void Dispose(bool disposing)
		{
			if (!this.IsDisposed)
			{
				try
				{
					// release any unmanaged resources
					this.Release();

					// release any managed resources
					if (disposing)
					{
						this.Clear();

						this.db				= null;
						this.fields			= null;
						this.parameters		= null;
						this.transaction	= null;
						this.outputParams	= null;
						this.allRowsFetched	= false;
						this.recordsAffected = 0;
						this.state	= StatementState.Deallocated;
						this.handle = 0;
					}
				}
				finally
				{
					base.Dispose(disposing);
				}
			}
		}
예제 #12
0
		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();

			if (transaction != null)
			{
				this.Transaction = transaction;
			}

			GC.SuppressFinalize(this);
		}