private static SqlParameter[] GetSpParameterSetInternal(SqlConnection connection, string spName, bool includeReturnValueParameter) { if (connection == null) { throw new ArgumentNullException("connection"); } if (spName == null || spName.Length == 0) { throw new ArgumentNullException("spName"); } string key = connection.ConnectionString + ":" + spName + (includeReturnValueParameter ? ":include ReturnValue Parameter" : ""); SqlParameter[] array = SqlHelperParameterCache.paramCache[key] as SqlParameter[]; if (array == null) { SqlParameter[] array2 = SqlHelperParameterCache.DiscoverSpParameterSet(connection, spName, includeReturnValueParameter); SqlHelperParameterCache.paramCache[key] = array2; array = array2; } return(SqlHelperParameterCache.CloneParameters(array)); }
internal static SqlParameter[] GetSpParameterSet(SqlConnection connection, string spName) { return(SqlHelperParameterCache.GetSpParameterSet(connection, spName, false)); }
///<summary> ///</summary> ///<param name="connectionString"></param> ///<param name="spName"></param> ///<returns></returns> public static SqlParameter[] GetSpParameterSet(string connectionString, string spName) { return(SqlHelperParameterCache.GetSpParameterSet(connectionString, spName, false)); }