return ImportMembersMapping (elementName, ns, members, hasWrapperElement, true);
}
-#if NET_2_0
[MonoTODO]
public
-#endif
XmlMembersMapping ImportMembersMapping (string elementName,
string ns,
XmlReflectionMember[] members,
return ImportMembersMapping (elementName, ns, members, hasWrapperElement, rpc, true);
}
-#if NET_2_0
[MonoTODO]
public
-#endif
XmlMembersMapping ImportMembersMapping (string elementName,
string ns,
XmlReflectionMember[] members,
return ImportMembersMapping (elementName, ns, members, hasWrapperElement, rpc, openModel, XmlMappingAccess.Read | XmlMappingAccess.Write);
}
-#if NET_2_0
[MonoTODO] // FIXME: handle writeAccessors, validate, and mapping access
public
-#endif
XmlMembersMapping ImportMembersMapping (string elementName,
string ns,
XmlReflectionMember[] members,
mps.RelatedMaps = relatedMaps;
mps.Format = SerializationFormat.Literal;
Type[] extraTypes = includedTypes != null ? (Type[])includedTypes.ToArray(typeof(Type)) : null;
-#if !NET_2_1
+#if !MOBILE
mps.Source = new MembersSerializationSource (elementName, hasWrapperElement, members, false, true, ns, extraTypes);
if (allowPrivateTypes) mps.Source.CanBeGenerated = false;
#endif
default: throw new NotSupportedException ("Type " + typeData.Type.FullName + " not supported for XML stialization");
}
-#if NET_2_0
// bug #372780
map.SetKey (typeData.Type.ToString ());
-#endif
map.RelatedMaps = relatedMaps;
map.Format = SerializationFormat.Literal;
Type[] extraTypes = includedTypes != null ? (Type[]) includedTypes.ToArray (typeof (Type)) : null;
-#if !NET_2_1
+#if !MOBILE
map.Source = new XmlTypeSerializationSource (typeData.Type, root, attributeOverrides, defaultNamespace, extraTypes);
if (allowPrivateTypes) map.Source.CanBeGenerated = false;
#endif
elem.Form = att.Form;
if (att.Form == XmlSchemaForm.Unqualified)
elem.Namespace = string.Empty;
- elem.IsNullable = att.IsNullable && CanBeNull (elem.TypeData);
+ elem.IsNullable = (!att.IsNullableSpecified || att.IsNullable) && CanBeNull (elem.TypeData);
elem.NestingLevel = att.NestingLevel;
if (isMultiArray) {
bool CanBeNull (TypeData type)
{
-#if !NET_2_0 // idiotic compatibility
- if (type.Type == typeof (XmlQualifiedName))
- return false;
-#endif
return !type.Type.IsValueType || type.IsNullable;
}