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 str = string.Concat(connection.ConnectionString, ":", spName, (includeReturnValueParameter ? ":include ReturnValue Parameter" : "")); SqlParameter[] item = SqlHelperParameterCache.paramCache[str] as SqlParameter[]; if (item == null) { SqlParameter[] sqlParameterArray = SqlHelperParameterCache.DiscoverSpParameterSet(connection, spName, includeReturnValueParameter); SqlHelperParameterCache.paramCache[str] = sqlParameterArray; item = sqlParameterArray; } return(SqlHelperParameterCache.CloneParameters(item)); }
public static SqlParameter[] GetSpParameterSet(string connectionString, string spName) { return(SqlHelperParameterCache.GetSpParameterSet(connectionString, spName, false)); }
internal static SqlParameter[] GetSpParameterSet(SqlConnection connection, string spName) { return(SqlHelperParameterCache.GetSpParameterSet(connection, spName, false)); }