예제 #1
0
        public IDataParameter[] GetCachedParameterSet(
            string connectionString,
            IDbCommand command)
        {
            string commandText = command.CommandText;

            return(CachingMechanism.CloneParameters((IDataParameter[])this.paramCache[(object)CachingMechanism.CreateHashKey(connectionString, commandText)]));
        }
예제 #2
0
        private static IDataParameter[] CreateParameterCopy(DbCommand command)
        {
            IDataParameterCollection parameters = (IDataParameterCollection)command.Parameters;

            IDataParameter[] originalParameters = new IDataParameter[parameters.Count];
            parameters.CopyTo((Array)originalParameters, 0);
            return(CachingMechanism.CloneParameters(originalParameters));
        }
예제 #3
0
        private static IDataParameter[] CreateParameterCopy(DbCommand command)
        {
            IDataParameterCollection parameters = command.Parameters;

            IDataParameter[] parameterArray = new IDataParameter[parameters.Count];
            parameters.CopyTo(parameterArray, 0);
            return(CachingMechanism.CloneParameters(parameterArray));
        }