Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public static SqlParameter[] GetSpParameterSet(string connectionString, string spName)
 {
     return(SqlHelperParameterCache.GetSpParameterSet(connectionString, spName, false));
 }
Esempio n. 3
0
 internal static SqlParameter[] GetSpParameterSet(SqlConnection connection, string spName)
 {
     return(SqlHelperParameterCache.GetSpParameterSet(connection, spName, false));
 }