CodeGenerationOptions 列舉

定義

指定在產生 .NET 類型以便搭配 XML Web Service 使用時要使用的各種選項。

此列舉支援其成員值的位元組合。

public enum class CodeGenerationOptions
[System.Flags]
public enum CodeGenerationOptions
[<System.Flags>]
type CodeGenerationOptions = 
Public Enum CodeGenerationOptions
繼承
CodeGenerationOptions
屬性

欄位

EnableDataBinding 16

啟用資料繫結。

GenerateNewAsync 2

為 Web 方法的非同步引動過程建立事件。

GenerateOldAsync 4

為 Web 方法的非同步引動過程建立 Begin 和 End 方法。

GenerateOrder 8

產生明確排序的序列化程式碼,如同透過 XmlAnyElementAttributeXmlArrayAttributeXmlElementAttribute 屬性 (Attribute) 的 Order 屬性 (Property) 所指定。

GenerateProperties 1

按照屬性表示基本類型。

None 0

以欄位和 System 命名空間類型來表示基本類型。

範例

下列範例說明如何使用 CodeGenerationOptions 列舉來指定 對象的行為 ServiceDescriptionImporter

// Generate properties to represent primitive values.
importer->CodeGenerationOptions = System::Xml::Serialization::CodeGenerationOptions::GenerateProperties;
// Generate properties to represent primitive values.
importer.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties;

備註

如需此 API 的詳細資訊,請參閱 CodeGenerationOptions 的補充 API 備註

適用於

另請參閱