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)); }
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)); }