Beispiel #1
0
        internal void RegisterCallback <TParameter>(DbParameter parameter, Action <TParameter> callback)
        {
            var dataCallback = new DataCallback
            {
                Callback  = callback,
                Type      = typeof(TParameter),
                Parameter = parameter
            };

            _callbacks.Enqueue(dataCallback);
        }
        /// <summary>
        /// Register a return value <paramref name="callback" /> for the specified <paramref name="parameter" />.
        /// </summary>
        /// <typeparam name="TParameter">The type of the parameter value.</typeparam>
        /// <param name="parameter">The <see cref="IDbDataParameter" /> to add.</param>
        /// <param name="callback">The callback used to get the out value.</param>
        /// <returns>
        /// A fluent <see langword="interface" /> to the data command.
        /// </returns>
        public IDataCommand RegisterCallback <TParameter>(DbParameter parameter, Action <TParameter> callback)
        {
            var dataCallback = new DataCallback
            {
                Callback  = callback,
                Type      = typeof(TParameter),
                Parameter = parameter
            };

            _callbacks.Enqueue(dataCallback);

            return(this);
        }