コード例 #1
0
        /// <summary>
        /// Invoked to execute the associated command and returns the integer produced by that
        /// execution.
        /// </summary>
        protected override int OnExecute()
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(this.ToString());
            }
            if (Command.IsDisposed)
            {
                throw new ObjectDisposedException(Command.ToString());
            }
            if (Command.Link.IsDisposed)
            {
                throw new ObjectDisposedException(Command.Link.ToString());
            }

            SurrogateDirect surrogate = null;
            int             result    = 0;

            try
            {
                surrogate = new SurrogateDirect(Command);
                result    = surrogate.OnExecuteScalar();
            }
            finally
            {
                if (surrogate != null)
                {
                    try { surrogate.Dispose(); }
                    catch { }
                }
            }

            return(result);
        }
コード例 #2
0
		/// <summary>
		/// Invoked to execute the associated command and returns the integer produced by that
		/// execution.
		/// </summary>
		protected override int OnExecute()
		{
			if (IsDisposed) throw new ObjectDisposedException(this.ToString());
			if (Command.IsDisposed) throw new ObjectDisposedException(Command.ToString());
			if (Command.Link.IsDisposed) throw new ObjectDisposedException(Command.Link.ToString());

			SurrogateDirect surrogate = null;
			int result = 0;

			try
			{
				surrogate = new SurrogateDirect(Command);
				result = surrogate.OnExecuteScalar();
			}
			finally
			{
				if (surrogate != null)
				{
					try { surrogate.Dispose(); }
					catch { }
				}
			}

			return result;
		}
コード例 #3
0
 /// <summary>
 /// Invoked to reset this enumerator so that is can execute its associated command again.
 /// </summary>
 protected override void OnReset()
 {
     if (_Surrogate != null)
     {
         _Surrogate.OnReaderReset();
     }
     _Surrogate = null;
 }
コード例 #4
0
		/// <summary>
		/// Invoked to reset this enumerator so that is can execute its associated command again.
		/// </summary>
		protected override void OnReset()
		{
			if (_Surrogate != null) _Surrogate.OnReaderReset();
			_Surrogate = null;
		}
コード例 #5
0
		/// <summary>
		/// Invoked to execute the command returning the schema that describes the record to be
		/// produced by that execution.
		/// </summary>
		/// <returns>The schema of the records to be produced.</returns>
		protected override Core.ISchema OnReaderStart()
		{
			_Surrogate = new SurrogateDirect(Command);
			return _Surrogate.OnReaderStart();
		}
コード例 #6
0
 /// <summary>
 /// Invoked to execute the command returning the schema that describes the record to be
 /// produced by that execution.
 /// </summary>
 /// <returns>The schema of the records to be produced.</returns>
 protected override Core.ISchema OnReaderStart()
 {
     _Surrogate = new SurrogateDirect(Command);
     return(_Surrogate.OnReaderStart());
 }