private PrimitiveMapping ImportNonXsdPrimitiveDataType(XmlSchemaSimpleType dataType, string ns, TypeFlags flags)
{
PrimitiveMapping mapping = null;
TypeDesc typeDesc = null;
if (dataType.Name != null && dataType.Name.Length != 0)
{
typeDesc = Scope.GetTypeDesc(dataType.Name, ns, flags);
if (typeDesc != null)
{
mapping = new PrimitiveMapping();
mapping.TypeDesc = typeDesc;
mapping.TypeName = typeDesc.DataType.Name;
mapping.Namespace = mapping.TypeDesc.IsXsdType ? XmlSchema.Namespace : ns;
}
}
return mapping;
}