英語で読む

次の方法で共有


CodeGenerationOptions 列挙型

定義

XML Web サービスで使用する .NET 型を生成するときに使用する各種のオプションを指定します。

この列挙体は、メンバー値のビットごとの組み合わせをサポートしています。

C#
[System.Flags]
public enum CodeGenerationOptions
継承
CodeGenerationOptions
属性

フィールド

名前 説明
EnableDataBinding 16

データ バインディングを有効にします。

GenerateNewAsync 2

Web メソッドを非同期呼び出しするイベントを作成します。

GenerateOldAsync 4

Web メソッドの非同期呼び出し用の Begin メソッドおよび End メソッドを作成します。

GenerateOrder 8

XmlAnyElementAttributeXmlArrayAttribute、および XmlElementAttribute 属性の Order プロパティで明示的に指定されている順序に従いシリアル化コードを生成します。

GenerateProperties 1

プロパティでプリミティブ型を表します。

None 0

フィールドおよび System 名前空間型でプリミティブ型を表します。

次の例は、 列挙を使用して オブジェクトの CodeGenerationOptions 動作を指定する方法を ServiceDescriptionImporter 示しています。

C#
// Generate properties to represent primitive values.
importer.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties;

注釈

この API の詳細については、「 CodeGenerationOptions の補足 API 解説」を参照してください。

適用対象

製品 バージョン
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

こちらもご覧ください