SchemaImporterExtension.ImportAnyElement(XmlSchemaAny, Boolean, XmlSchemas, XmlSchemaImporter, CodeCompileUnit, CodeNamespace, CodeGenerationOptions, CodeDomProvider) 方法

定義

處理結構描述中 <xsd:any> 項目的匯入。Handles the importation of the <xsd:any> elements in the schema.

public:
 virtual System::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);
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);
abstract member ImportAnyElement : System.Xml.Schema.XmlSchemaAny * bool * System.Xml.Serialization.XmlSchemas * System.Xml.Serialization.XmlSchemaImporter * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.Xml.Serialization.CodeGenerationOptions * System.CodeDom.Compiler.CodeDomProvider -> string
override this.ImportAnyElement : System.Xml.Schema.XmlSchemaAny * bool * System.Xml.Serialization.XmlSchemas * System.Xml.Serialization.XmlSchemaImporter * System.CodeDom.CodeCompileUnit * System.CodeDom.CodeNamespace * System.Xml.Serialization.CodeGenerationOptions * System.CodeDom.Compiler.CodeDomProvider -> string
Public Overridable Function ImportAnyElement (any As XmlSchemaAny, mixed As Boolean, schemas As XmlSchemas, importer As XmlSchemaImporter, compileUnit As CodeCompileUnit, mainNamespace As CodeNamespace, options As CodeGenerationOptions, codeProvider As CodeDomProvider) As String

參數

any
XmlSchemaAny

在 XML 結構描述文件 (XSD) 中發現的 xsd:any 元素。The xsd:any element found in the XML Schema Document (XSD).

mixed
Boolean

true 以指出 XSD complex 屬性已設定為 "mixed";否則為 falsetrue to indicate the XSD complex attribute has been set to "mixed"; otherwise, false.

schemas
XmlSchemas

在 XSD 中發現的結構描述集合。The collection of schemas found in the XSD.

importer
XmlSchemaImporter

正在使用的匯入工具。The importer being used.

compileUnit
CodeCompileUnit

CodeCompileUnit,可以將 CodeDOM 結構加入其中,為 XSD 產生替代程式碼。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

用於產生新程式碼的 CodeDOM 提供者。The CodeDOM provider used to generate the new code.

傳回

項目對應至的 CLR 型別名稱。The name of the CLR type that the element maps to.

備註

為了控制程式代碼的產生, 您必須使用在System.CodeDom命名空間中找到的類別。In order to control the generation of the code, you must use the classes found in the System.CodeDom namespace. 如需詳細資訊, 請參閱使用 codedomcodedom 快速參考For more information, see Using the CodeDOM and CodeDOM Quick Reference.

適用於