/// <summary>
 /// Gets the regular expression for the safe value
 /// </summary>
 protected Regex SelectSafeRegEx(SQLQueryEnum regExType)
 {
     switch (regExType)
     {
         case SQLQueryEnum.Where:
             return SqlSecurityHelper.WhereRegex;
         case SQLQueryEnum.OrderBy:
             return SqlSecurityHelper.OrderByRegex;
         case SQLQueryEnum.Columns:
             return SqlSecurityHelper.ColumnsRegex;
         default : return SqlSecurityHelper.ColumnsRegex;
     }
 }
Пример #2
0
    /// <summary>
    /// Gets the regular expression for the safe value
    /// </summary>
    protected Regex SelectSafeRegEx(SQLQueryEnum regExType)
    {
        switch (regExType)
        {
        case SQLQueryEnum.Where:
            return(SqlSecurityHelper.WhereRegex);

        case SQLQueryEnum.OrderBy:
            return(SqlSecurityHelper.OrderByRegex);

        case SQLQueryEnum.Columns:
            return(SqlSecurityHelper.ColumnsRegex);

        default: return(SqlSecurityHelper.ColumnsRegex);
        }
    }
 /// <summary>
 /// Gets the regular expression for the safe value
 /// </summary>
 protected Regex GetSafeRegEx(SQLQueryEnum regExType)
 {
     return SelectSafeRegEx(regExType);
 }
Пример #4
0
 /// <summary>
 /// Gets the regular expression for the safe value
 /// </summary>
 protected Regex GetSafeRegEx(SQLQueryEnum regExType)
 {
     return(SelectSafeRegEx(regExType));
 }