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. 在進行方法呼叫之前可能已關閉 ww may have been closed before the method call was made.

適用於