Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the...

Examples of errors detected by the V3122 diagnostic

V3122. Uppercase (lowercase) string is compared with a different lowercase (uppercase) string.


SqlSugar

V3122 Lowercase string is compared with a different mixed case string. NavigatManager.cs 1131


private static void AppColumns(SqlInfo result,
  ISugarQueryable<object> queryable,
  string columnName)
{
  var selectPkName = queryable.SqlBuilder.GetTranslationColumnName(columnName);
  if (result.IsSelectNav)
  {
    if (   result.SelectString != null
        && !result.SelectString
                  .ToLower()
                  .Contains($" {selectPkName.ToLower()}
                              AS {selectPkName.ToLower()}"))            // <=
    {
      result.SelectString = result.SelectString + ","
        + (selectPkName + " AS " + selectPkName);
    }
  }
  ....
}

DotNetNuke

V3122 The 'path.ToLowerInvariant()' lowercase string is compared with the 'Localization.LocalResourceDirectory' mixed case string. LanguagesController.cs 644


public static string LocalResourceDirectory
{
  get
  {
    return "App_LocalResources";
  }
}

private static bool HasLocalResources(string path)
{
  var folderInfo = new DirectoryInfo(path);

  if (path.ToLowerInvariant().EndsWith(Localization.LocalResourceDirectory))
  {
    return true;
  }
  ....
}

DotNetNuke

V3122 The 'result.RewritePath.ToLowerInvariant()' lowercase string is compared with the '"tabId="' mixed case string. AdvancedUrlRewriter.cs 2252


private void ProcessRequest(....)
{
  ....
  if (!result.RewritePath.ToLowerInvariant().Contains("tabId="))
  ....
}