ICodeGenerator.Supports(GeneratorSupport) 方法

定義

取得值,指出產生器是否支援指定 GeneratorSupport 物件所表示的語言功能。Gets a value indicating whether the generator provides support for the language features represented by the specified GeneratorSupport object.

public:
 bool Supports(System::CodeDom::Compiler::GeneratorSupport supports);
public bool Supports (System.CodeDom.Compiler.GeneratorSupport supports);
abstract member Supports : System.CodeDom.Compiler.GeneratorSupport -> bool
Public Function Supports (supports As GeneratorSupport) As Boolean

參數

supports
GeneratorSupport

要測試的產生器能力。The capabilities to test the generator for.

傳回

如果支援指定的能力,則為 true,否則為 falsetrue if the specified capabilities are supported; otherwise, false.

備註

您可以使用多個GeneratorSupport旗標一次呼叫這個方法, 藉由聯結一組適當的功能旗標和二進位 "Or" 運算子 (|) 來測試一組功能。This method can be called with a number of GeneratorSupport flags at once to test for a set of capabilities by joining a set of appropriate capability flags together with a binary "Or" operator (|).

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code.

InheritanceDemand
適用於繼承者的完全信任的。for full trust for inheritors. 部分信任的程式碼無法繼承這個成員。This member cannot be inherited by partially trusted code.

適用於