XsdDataContractImporter.CanImport Method (XmlSchemaSet, ICollection<XmlQualifiedName>)

 

Gets a value that indicates whether the specified set of types contained in an XmlSchemaSet can be transformed into CLR types generated into a CodeCompileUnit.

Namespace:   System.Runtime.Serialization
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

public bool CanImport(
	XmlSchemaSet schemas,
	ICollection<XmlQualifiedName> typeNames
)

Parameters

schemas
Type: System.Xml.Schema.XmlSchemaSet

A XmlSchemaSet that contains the schemas to transform.

typeNames
Type: System.Collections.Generic.ICollection<XmlQualifiedName>

An ICollection<T> of XmlQualifiedName that represents the set of schema types to import.

Return Value

Type: System.Boolean

true if the schemas can be transformed; otherwise, false.

Exception Condition
ArgumentNullException

The schemas or typeNames parameter is null.

InvalidDataContractException

A data contract involved in the import is invalid.

.NET Framework
Available since 3.0
Return to top
Show: