184 for (
int i = 0; i <
names.Length; i++)
264 if (element.
Name.Length == 0)
327 typeMapping = ((!(
element.SchemaType is XmlSchemaComplexType)) ?
ImportDataType((
XmlSchemaSimpleType)element.
SchemaType, ns,
identifier,
baseType, (
TypeFlags)56,
isList:
false) :
ImportType((
XmlSchemaComplexType)element.
SchemaType, ns,
identifier,
desiredMappingType,
baseType,
TypeFlags.CanBeElementValue));
391 if (name.Name ==
"anyType" && name.Namespace ==
"http://www.w3.org/2001/XMLSchema")
417 if (
addref && name.Namespace !=
"http://www.w3.org/2001/XMLSchema")
427 if (
type.Redefined !=
null)
458 if (!
type.DerivedFrom.IsEmpty)
479 if (!
type.DerivedFrom.IsEmpty)
632 ImportGroup(
typeItems.Particle,
identifier,
members,
membersScope,
elementsScope, typeNs, flag,
ref needExplicitOrder, order,
typeItems.IsUnbounded,
allowUnboundedElements);
721 private void ImportGroup(
XmlSchemaGroupBase group,
string identifier,
CodeIdentifiers members,
CodeIdentifiers membersScope,
INameScope elementsScope,
string ns,
bool mixed,
ref bool needExplicitOrder,
bool allowDuplicates,
bool groupRepeats,
bool allowUnboundedElements)
729 ImportGroupMembers(
group,
identifier,
members,
membersScope,
elementsScope, ns,
groupRepeats,
ref mixed,
ref needExplicitOrder,
allowDuplicates,
allowUnboundedElements);
785 for (
int j = 0;
j <
array.Length;
j++)
993 for (
int i = 0; i < elements.Length; i++)
1000 private void ImportGroupMembers(
XmlSchemaParticle particle,
string identifier,
CodeIdentifiers members,
CodeIdentifiers membersScope,
INameScope elementsScope,
string ns,
bool groupRepeats,
ref bool mixed,
ref bool needExplicitOrder,
bool allowDuplicates,
bool allowUnboundedElements)
1008 ImportGroupMembers(
FindGroup(
xmlSchemaGroupRef.RefName).
Particle,
identifier,
members,
membersScope,
elementsScope,
xmlSchemaGroupRef.RefName.Namespace,
groupRepeats |
xmlSchemaGroupRef.IsMultipleOccurrence,
ref mixed,
ref needExplicitOrder,
allowDuplicates,
allowUnboundedElements);
1045 ImportGroupMembers((
XmlSchemaParticle)
obj,
identifier,
members,
membersScope,
elementsScope, ns,
groupRepeats,
ref mixed,
ref needExplicitOrder,
allowDuplicates,
allowUnboundedElements:
true);
1065 for (
int i = 0; i <
item.Items.Count; i++)
1160 bool flag =
any.IsMultipleOccurrence;
1260 if (!
type.DerivedFrom.IsEmpty)
1343 if (
type.Name !=
null &&
type.Name.Length != 0)
1388 if (!
type.DerivedFrom.IsEmpty)
1427 if (
typeItems.AnyAttribute !=
null || flag)
1539 if (
type.Annotation ==
null)
1543 if (
type.Annotation.Items ==
null ||
type.Annotation.Items.Count == 0)
1566 if (
xmlElement.Name ==
"keepNamespaceDeclarations")
1607 for (
int i = 0; i <
group.Attributes.
Count; i++)
1619 if (
group.AnyAttribute !=
null)
1648 if (
attribute.RefName.Namespace ==
"http://www.w3.org/XML/1998/namespace")
1786 if (dataType.
Name !=
null && dataType.
Name.Length > 0)
1841 for (
int i = 0; i <
choice.Length; i++)
1870 if (dataType.
Name !=
null && dataType.
Name.Length != 0)
1930 if (dataType.
Name !=
null && dataType.
Name.Length != 0)
1951 if (name ==
null || name.IsEmpty)
1965 if (name.Namespace ==
"http://www.w3.org/2001/XMLSchema")
1967 return (
XmlSchemaSimpleType)
base.Scope.GetTypeDesc(
"string",
"http://www.w3.org/2001/XMLSchema", flags).DataType;
1969 if (name.Name ==
"Array" && name.Namespace ==
"http://schemas.xmlsoap.org/soap/encoding/")
1979 if (name ==
null || name.IsEmpty)
1981 return base.Scope.GetTypeDesc(
typeof(
string)).DataType;
2022 if (ns ==
null || ns.Length == 0)
2039 return element.
Form;
2053 if (ns ==
null || ns.Length == 0)
2055 if (
xmlSchema.AttributeFormDefault != 0)
2062 if (
attribute.QualifiedName.Namespace !=
null &&
attribute.QualifiedName.Namespace.Length != 0)
static void Sort(Array array)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
Enumerator GetEnumerator()
void Add(TKey key, TValue value)
virtual ICollection Values
virtual void Add(object key, object? value)
static CultureInfo InvariantCulture
static string XmlElementHasNoName
static string XmlTypeUsedTwice
static string XmlMembersDeriveError
static string XmlMissingDataType
static string XmlBadBaseType
static string XmlInternalError
static string Format(string resourceFormat, object p1)
static string XmlMissingAttribute
static string XmlBadBaseElement
static string XmlCircularGroupReference
static string XmlMissingAttributeGroup
static string XmlInvalidEncoding
static string XmlElementImportedTwice
static string XmlDuplicateElementInScope1
static string XmlMissingGroup
static string XmlAttributeHasNoName
static string XmlMissingElement
static string XmlUnsupportedRedefine
static string XmlDuplicateElementInScope
static string XmlIllegalOverride
static string XmlCircularTypeReference
XmlSchemaType? SchemaType
XmlQualifiedName SchemaTypeName
XmlQualifiedName QualifiedName
XmlQualifiedName SubstitutionGroup
XmlSchemaObjectCollection Items
XmlSchemaGroupBase? Particle
bool IsMultipleOccurrence
XmlSchemaSimpleTypeContent? Content
static string UnescapeName(string name)
static string EscapeName(string name)
static string MakePascal(string identifier)
static string MakeValid(string identifier)
void MakeDerived(StructMapping structMapping, Type baseType, bool baseTypeCanBeIndirect)
void RemoveReference(XmlQualifiedName name, NameTable references)
StructMapping GetRootMapping()
void AddReference(XmlQualifiedName name, NameTable references, string error)
void AddReservedIdentifiersForDataBinding(CodeIdentifiers scope)
StructMapping ImportRootMapping()
static TypeDesc FindCommonBaseTypeDesc(TypeDesc[] typeDescs)
int Compare(object o1, object o2)
XmlQualifiedName baseSimpleType
XmlSchemaGroupBase Particle
XmlSchemaObjectCollection Attributes
XmlSchemaAnyAttribute AnyAttribute
MembersMapping ImportMembersType(XmlSchemaType type, string typeNs, string identifier)
static XmlQualifiedName BaseTypeName(XmlSchemaSimpleType dataType)
XmlMembersMapping ImportMembersMapping(XmlQualifiedName[] names)
void ImportAttributeGroupMembers(XmlSchemaAttributeGroup group, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, string ns)
TypeMapping ImportType(XmlQualifiedName name, Type desiredMappingType, Type baseType, TypeFlags flags, bool addref)
void ImportXmlnsDeclarationsMember(XmlSchemaType type, CodeIdentifiers members, CodeIdentifiers membersScope)
AttributeAccessor ImportSpecialAttribute(XmlQualifiedName name, string identifier)
static bool IsMixed(XmlSchemaType type)
XmlMembersMapping? ImportAnyType(XmlQualifiedName typeName, string elementName)
TypeDesc GetDataTypeSource(XmlSchemaSimpleType dataType, TypeFlags flags)
ElementAccessor ImportArray(XmlSchemaElement element, string identifier, string ns, bool repeats)
bool ImportSubstitutionGroupMember(XmlSchemaElement element, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, string ns, bool repeats, ref bool needExplicitOrder, bool allowDuplicates)
bool KeepXmlnsDeclarations(XmlSchemaType type, out string xmlnsMemberName)
XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName)
XmlSchemaElement[] GetEquivalentElements(XmlSchemaElement element)
XmlSchemaSimpleType FindDataType(XmlQualifiedName name, TypeFlags flags)
TypeMapping ImportEnumeratedDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, TypeFlags flags, bool isList)
void RunSchemaExtensions(TypeMapping mapping, XmlQualifiedName qname, XmlSchemaType type, XmlSchemaObject context, TypeFlags flags)
MemberMapping[] ImportTypeMembers(XmlSchemaType type, string typeNs, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, ref bool needExplicitOrder, bool order, bool allowUnboundedElements)
TypeMapping ImportElementType(XmlSchemaElement element, string identifier, Type desiredMappingType, Type baseType, string ns)
void AddScopeElement(INameScope scope, ElementAccessor element, ref bool duplicateElements, bool allowDuplicates)
TypeMapping GetDefaultMapping(TypeFlags flags)
XmlTypeMapping ImportTypeMapping(XmlQualifiedName name)
XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type? baseType)
XmlSchemaForm AttributeForm(string ns, XmlSchemaAttribute attribute)
TypeMapping ImportType(XmlSchemaComplexType type, string typeNs, string identifier, Type desiredMappingType, Type baseType, TypeFlags flags)
ElementAccessor ImportElement(XmlQualifiedName name, Type desiredMappingType, Type baseType)
XmlSchemaAttribute FindAttribute(XmlQualifiedName name)
EnumMapping ImportEnumeratedChoice(ElementAccessor[] choice, string typeNs, string typeName)
XmlTypeMapping ImportDerivedTypeMapping(XmlQualifiedName name, Type? baseType, bool baseTypeCanBeIndirect)
PrimitiveMapping ImportNonXsdPrimitiveDataType(XmlSchemaSimpleType dataType, string ns, TypeFlags flags)
TypeItems GetTypeItems(XmlSchemaType type)
MemberMapping ImportAnyMember(XmlSchemaAny any, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string ns, ref bool mixed, ref bool needExplicitOrder, bool allowDuplicates)
StructMapping ImportStructType(XmlSchemaType type, string typeNs, string identifier, Type baseType, bool arrayLike)
XmlMembersMapping ImportMembersMapping(string name, string? ns, SoapSchemaMember[] members)
XmlSchemaGroup FindGroup(XmlQualifiedName name)
ArrayMapping ImportArrayMapping(XmlSchemaType type, string identifier, string ns, bool repeats)
override void ImportDerivedTypes(XmlQualifiedName baseName)
XmlSchemaAttributeGroup FindAttributeGroup(XmlQualifiedName name)
bool IsCyclicReferencedType(XmlSchemaElement element, List< string > identifiers)
XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type? baseType)
void ImportAttributeMember(XmlSchemaAttribute attribute, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, string ns)
XmlMembersMapping ImportMembersMapping(XmlQualifiedName[] names, Type? baseType, bool baseTypeCanBeIndirect)
XmlSchemaType FindType(XmlQualifiedName name, TypeFlags flags)
void ImportGroup(XmlSchemaGroupBase group, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string ns, bool mixed, ref bool needExplicitOrder, bool allowDuplicates, bool groupRepeats, bool allowUnboundedElements)
bool GatherGroupChoices(XmlSchemaGroup group, NameTable choiceElements, string identifier, string ns, ref bool needExplicitOrder, bool allowDuplicates)
ElementAccessor ImportElement(XmlSchemaElement element, string identifier, Type desiredMappingType, Type baseType, string ns, bool topLevelElement)
XmlSchemaImporter(XmlSchemas schemas, CodeIdentifiers? typeIdentifiers)
StructMapping ImportStructDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, Type baseType)
void AddScopeElements(INameScope scope, ElementAccessor[] elements, ref bool duplicateElements, bool allowDuplicates)
XmlMembersMapping ImportMembersMapping(XmlQualifiedName name)
void ImportTextMember(CodeIdentifiers members, CodeIdentifiers membersScope, XmlQualifiedName simpleContentType)
void ImportAnyAttributeMember(XmlSchemaAnyAttribute any, CodeIdentifiers members, CodeIdentifiers membersScope)
XmlSchemaImporter(XmlSchemas schemas)
ElementAccessor[] ImportAny(XmlSchemaAny any, bool makeElement, string targetNamespace)
XmlSchemaElement FindElement(XmlQualifiedName name)
MemberMapping ImportChoiceGroup(XmlSchemaGroupBase group, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string ns, bool groupRepeats, ref bool needExplicitOrder, bool allowDuplicates)
bool GatherGroupChoices(XmlSchemaParticle particle, NameTable choiceElements, string identifier, string ns, ref bool needExplicitOrder, bool allowDuplicates)
XmlTypeMapping ImportSchemaType(XmlQualifiedName typeName, Type? baseType, bool baseTypeCanBeIndirect)
XmlSchemaForm ElementForm(string ns, XmlSchemaElement element)
SpecialMapping ImportAnyMapping(XmlSchemaType type, string identifier, string ns, bool repeats)
AttributeAccessor ImportAttribute(XmlSchemaAttribute attribute, string identifier, string ns, XmlSchemaAttribute defaultValueProvider)
bool IsNeedXmlSerializationAttributes(ArrayMapping arrayMapping)
void ImportElementMember(XmlSchemaElement element, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string ns, bool repeats, ref bool needExplicitOrder, bool allowDuplicates, bool allowUnboundedElements)
bool IsAllGroup(XmlSchemaType type)
string GenerateUniqueTypeName(string desiredName, string ns)
void ImportGroupMembers(XmlSchemaParticle particle, string identifier, CodeIdentifiers members, CodeIdentifiers membersScope, INameScope elementsScope, string ns, bool groupRepeats, ref bool mixed, ref bool needExplicitOrder, bool allowDuplicates, bool allowUnboundedElements)
TypeMapping ImportDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, Type baseType, TypeFlags flags, bool isList)
PrimitiveMapping ImportPrimitiveDataType(XmlSchemaSimpleType dataType, TypeFlags flags)
XmlSchemaElement GetTopLevelElement(XmlSchemaElement element)
static void Preprocess(XmlSchema schema)
static XmlQualifiedName GetParentName(XmlSchemaObject item)
static bool IsDataSet(XmlSchema schema)
static readonly XmlQualifiedName Empty