CodeGenerator.ICodeGenerator.GenerateCodeFromStatement(CodeStatement, TextWriter, CodeGeneratorOptions) 方法

定义

生成指定代码文档对象模型 (CodeDOM) 语句的代码,并使用指定选项将其输出到指定的文本编写器。Generates code for the specified Code Document Object Model (CodeDOM) statement and outputs it to the specified text writer using the specified options.

 virtual void System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromStatement(System::CodeDom::CodeStatement ^ e, System::IO::TextWriter ^ w, System::CodeDom::Compiler::CodeGeneratorOptions ^ o) = System::CodeDom::Compiler::ICodeGenerator::GenerateCodeFromStatement;
void ICodeGenerator.GenerateCodeFromStatement (System.CodeDom.CodeStatement e, System.IO.TextWriter w, System.CodeDom.Compiler.CodeGeneratorOptions o);
abstract member System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromStatement : System.CodeDom.CodeStatement * System.IO.TextWriter * System.CodeDom.Compiler.CodeGeneratorOptions -> unit
override this.System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromStatement : System.CodeDom.CodeStatement * System.IO.TextWriter * System.CodeDom.Compiler.CodeGeneratorOptions -> unit
Sub GenerateCodeFromStatement (e As CodeStatement, w As TextWriter, o As CodeGeneratorOptions) Implements ICodeGenerator.GenerateCodeFromStatement

参数

e
CodeStatement

包含要转换的 CodeDOM 元素的语句。The statement that contains the CodeDOM elements to translate.

w
TextWriter

要向其输出代码的文本编写器。The text writer to output code to.

o
CodeGeneratorOptions

要用于生成代码的选项。The options to use for generating code.

实现

例外

w 不可用。w is not available. w 可能在调用方法之前已关闭。w may have been closed before the method call was made.

适用于