Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -443,6 +443,8 @@ namespace System.Xml.Serialization
XmlQualifiedName qname;
XmlSchemaType stype;
if (!schemas.IsCompiled)
schemas.Compile (null, true);
XmlSchemaElement elem = (XmlSchemaElement) schemas.Find (name, typeof (XmlSchemaElement));
if (!LocateElement (elem, out qname, out stype))
throw new InvalidOperationException (String.Format ("'{0}' is missing.", name));
@@ -729,7 +731,7 @@ namespace System.Xml.Serialization
if (refAttr.DefaultValue != null)
member.DefaultValue = ImportDefaultValue (member.TypeData, refAttr.DefaultValue);
else if (member.TypeData.IsValueType)
member.IsOptionalValueType = (refAttr.ValidatedUse != XmlSchemaUse.Required);
member.IsOptionalValueType = (refAttr.Use != XmlSchemaUse.Required);
if (member.TypeData.IsComplexType)
member.MappedType = GetTypeMapping (member.TypeData);
@@ -1690,7 +1692,7 @@ namespace System.Xml.Serialization
}
else
{
ns = attr.ParentIsSchema ? typeQName.Namespace : String.Empty;
ns = attr.Parent is XmlSchema ? typeQName.Namespace : String.Empty;
return attr;
}
}