C#


ROSLYN.GLOBALIZATION.CA1303 : Do not pass literals as localized parameters (C#)

See Roslyn-Detected C# Warning Classes for more information.

要旨

A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class.

この指摘はRoslynのCA1303に該当します。ルール詳細につい ては、下記リンクを参照してください。 CA1303

プロパティ

クラス名 Do not pass literals as localized parameters (C#)
日本語クラス名 Do not pass literals as localized parameters (C#)
クラス分類 信頼性 (reliability)
ニーモニック ROSLYN.GLOBALIZATION.CA1303
カテゴリー なし
対応言語 C# で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Do not pass literals as localized parameters (C#)"

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。