System.Xml.Serialization.Advanced.SchemaImporterExtension.ImportSchemaType Method

Allows you to manipulate the code generated by examining the imported schema and specifying the CLR type that it maps to.

Syntax

public virtual string ImportSchemaType (System.Xml.Schema.XmlSchemaType type, System.Xml.Schema.XmlSchemaObject context, 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

type
An System.Xml.Schema.XmlSchemaType that represents the XSD type.
context
An System.Xml.Schema.XmlSchemaObject that represents schema information, such as the line number of the XML element.
schemas
An System.Xml.Serialization.XmlSchemas that contains the collection of schemas in the document.
importer
The System.Xml.Serialization.XmlSchemaImporter that is the importer being used.
compileUnit
A System.CodeDom.CodeCompileUnit to which you can add CodeDOM structures to generate alternative code for the XSD.
mainNamespace
A System.CodeDom.CodeNamespace that represents the current namespace for the element.
options
A System.Xml.Serialization.CodeGenerationOptions for the setting options on the code compiler.
codeProvider
A System.CodeDom.Compiler.CodeDomProvider that is used to generate the new code.

Returns

The name of the CLR type that this maps to.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Xml.Serialization.Advanced
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0