CodeGenerationOptions 枚举
本文内容
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定在生成用于 XML Web services 的 .NET 类型时使用的各种选项。
此枚举支持其成员值的按位组合。
public enum class CodeGenerationOptions
[System.Flags]
public enum CodeGenerationOptions
[<System.Flags>]
type CodeGenerationOptions =
Public Enum CodeGenerationOptions
- 继承
- 属性
名称 | 值 | 说明 |
---|---|---|
EnableDataBinding | 16 | 启用数据绑定。 |
GenerateNewAsync | 2 | 创建异步调用 Web 方法的事件。 |
GenerateOldAsync | 4 | 创建异步调用 Web 方法的 Begin 和 End 方法。 |
GenerateOrder | 8 | 按 XmlAnyElementAttribute、XmlArrayAttribute 和 XmlElementAttribute 特性的 |
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 备注。
产品 | 版本 |
---|---|
.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 |