SchemaImporterExtension.ImportAnyElement Method

Definition

Handles the importation of the <xsd:any> elements in the schema.

public virtual string ImportAnyElement(System.Xml.Schema.XmlSchemaAny any, bool mixed, System.Xml.Serialization.XmlSchemas schemas, System.Xml.Serialization.XmlSchemaImporter importer, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.Xml.Serialization.CodeGenerationOptions options, System.CodeDom.Compiler.CodeDomProvider codeProvider);

Parameters

any
XmlSchemaAny

The xsd:any element found in the XML Schema Document (XSD).

mixed
Boolean

true to indicate the XSD complex attribute has been set to "mixed"; otherwise, false.

schemas
XmlSchemas

The collection of schemas found in the XSD.

importer
XmlSchemaImporter

The importer being used.

compileUnit
CodeCompileUnit

A CodeCompileUnit to which you can add CodeDOM structures to generate alternative code for the XSD.

mainNamespace
CodeNamespace

The current namespace for the element.

options
CodeGenerationOptions

A bitwise combination of the enumeration values that specify the setting options on the code compiler.

codeProvider
CodeDomProvider

The CodeDOM provider used to generate the new code.

Returns

The name of the CLR type that the element maps to.

Remarks

In order to control the generation of the code, you must use the classes found in the System.CodeDom namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.

Applies to

Продукт Версии
.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