Επεξεργασία

Κοινή χρήση μέσω


CodeGenerationOptions Enum

Definition

Specifies various options to use when generating .NET types for use with an XML Web Service.

This enumeration supports a bitwise combination of its member values.

public enum class CodeGenerationOptions
[System.Flags]
public enum CodeGenerationOptions
[<System.Flags>]
type CodeGenerationOptions = 
Public Enum CodeGenerationOptions
Inheritance
CodeGenerationOptions
Attributes

Fields

Name Value Description
None 0

Represents primitive types by fields and primitive types by System namespace types.

GenerateProperties 1

Represents primitive types by properties.

GenerateNewAsync 2

Creates events for the asynchronous invocation of Web methods.

GenerateOldAsync 4

Creates Begin and End methods for the asynchronous invocation of Web methods.

GenerateOrder 8

Generates explicitly ordered serialization code as specified through the Order property of the XmlAnyElementAttribute, XmlArrayAttribute, and XmlElementAttribute attributes.

EnableDataBinding 16

Enables data binding.

Examples

The following example illustrates the use of the CodeGenerationOptions enumeration to specify the behavior of a ServiceDescriptionImporter object.

// 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;

Remarks

For more information about this API, see Supplemental API remarks for CodeGenerationOptions.

Applies to

See also