CodeGenerator.ValidateIdentifiers(CodeObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to validate each identifier field contained in the specified CodeObject or System.CodeDom tree.
public:
static void ValidateIdentifiers(System::CodeDom::CodeObject ^ e);
public static void ValidateIdentifiers (System.CodeDom.CodeObject e);
static member ValidateIdentifiers : System.CodeDom.CodeObject -> unit
Public Shared Sub ValidateIdentifiers (e As CodeObject)
Parameters
An object to test for invalid identifiers.
Exceptions
The specified CodeObject contains an invalid identifier.
Remarks
It is possible for the identifier fields of CodeObject objects to contain field escape characters and hidden code which can allow security violations. This method checks the literal fields of each CodeObject in a System.CodeDom tree for characters which could be used to hide code, and throws an exception if an identifier field contains an invalid character.
This method calls the IsValidLanguageIndependentIdentifier method to validate each identifier in the specified CodeObject or System.CodeDom tree, and throws an exception if an identifier is invalid or contains invalid characters.
Call this method and pass it the CodeCompileUnit containing the code graph to generate before generating code to block the use of certain character sequences that can be used to include hidden code within an identifier field. This method is not called automatically by any generate code methods.
Applies to
See also
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示