Export (0) Print
Expand All

TypedDataSetSchemaImporterExtension.ImportSchemaType Method (XmlSchemaType, XmlSchemaObject, XmlSchemas, XmlSchemaImporter, CodeCompileUnit, CodeNamespace, CodeGenerationOptions, CodeDomProvider)

Generates internal type mapping information for an element defined in an XML schema document.

Namespace:  System.Data.Design
Assembly:  System.Design (in System.Design.dll)

public override string ImportSchemaType(
	XmlSchemaType type,
	XmlSchemaObject context,
	XmlSchemas schemas,
	XmlSchemaImporter importer,
	CodeCompileUnit compileUnit,
	CodeNamespace mainNamespace,
	CodeGenerationOptions options,
	CodeDomProvider codeProvider
)

Parameters

type
Type: System.Xml.Schema.XmlSchemaType

XMLSchemaType

context
Type: System.Xml.Schema.XmlSchemaObject

An XmlSchemaObject that represents the root class for the Xml schema object model hierarchy and serves as a base class for classes such as the XmlSchema class.

schemas
Type: System.Xml.Serialization.XmlSchemas

An XmlSchema class that represents a collection of XML schemas.

importer
Type: System.Xml.Serialization.XmlSchemaImporter

The base XmlSchemaImporter that generates internal mappings to .NET Framework types for XML schema element declarations, including literal XSD message parts in a WSDL document.

compileUnit
Type: System.CodeDom.CodeCompileUnit

The CodeCompileUnit to contain the generated code.

mainNamespace
Type: System.CodeDom.CodeNamespace

CodeNamespace

options
Type: System.Xml.Serialization.CodeGenerationOptions

The CodeGenerationOptions that specifies various options to use when generating .NET Framework types for use with an XML Web service.

codeProvider
Type: System.CodeDom.Compiler.CodeDomProvider

The language specific CodeDomProvider to use to generate the dataset.

Return Value

Type: System.String
Returns a String representing the name of the typed dataset class.

Security noteSecurity Note

Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see Untrusted Data Security Risks.

Expands upon the XmlSchemaImporter to provide additional functionality for typed datasets and generates internal mappings to .NET Framework types for XML schema element declarations, including literal XSD message parts in a WSDL document.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft