コード例 #1
0
        private static IDataParameter[] CreateParameterCopy(DbCommand command)
        {
            IDataParameterCollection parameters = command.Parameters;

            IDataParameter[] array = new IDataParameter[parameters.Count - 1];
            parameters.CopyTo(array, 0);
            return(CachingMechanism.CloneParameters(array));
        }
コード例 #2
0
        public IDataParameter[] GetCachedParameterSet(string connectionString, IDbCommand command)
        {
            string commandText = command.CommandText;
            string str2        = CreateHashKey(connectionString, commandText);

            IDataParameter[] originalParameters = (IDataParameter[])(this.paramCache[str2]);
            return(CachingMechanism.CloneParameters(originalParameters));
        }