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