public CanImport ( |
||
schemas | ||
typeName | ||
return | bool |
public bool CanImport (XmlSchemaSet schemas, XmlQualifiedName typeName)
{
if (schemas == null)
throw new ArgumentNullException ("schemas");
if (typeName == null)
throw new ArgumentNullException ("typeName");
if (!schemas.IsCompiled)
schemas.Compile ();
if (!schemas.GlobalTypes.Contains (typeName))
throw new InvalidDataContractException (String.Format ("Type {0} is not found in the schemas", typeName));
return CanImport (schemas, schemas.GlobalTypes [typeName] as XmlSchemaComplexType);
}
XsdDataContractImporter::CanImport ( |
|
XsdDataContractImporter::CanImport ( |
|
XsdDataContractImporter::CanImport ( |
|
XsdDataContractImporter::CanImport ( |
void DoCanImport (bool result, params string [] schemaFiles) { var ccu = new CodeCompileUnit (); var xdi = new XsdDataContractImporter (ccu); var xss = new XmlSchemaSet (); foreach (var schemaFile in schemaFiles) xss.Add (null, schemaFile); Assert.AreEqual (result, xdi.CanImport (xss)); }