projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* XmlTypeAttribute.cs: added property AnonymousType for 2.0
[mono.git]
/
mcs
/
class
/
System.XML
/
System.Xml.Serialization
/
XmlTypeMapMemberElement.cs
diff --git
a/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapMemberElement.cs
b/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapMemberElement.cs
index e486f4c54e0a4a093892ef4d54719c1a692c2d00..30b0614e97c524b9a1ea683f4e01d2306293e75d 100644
(file)
--- a/
mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapMemberElement.cs
+++ b/
mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapMemberElement.cs
@@
-42,6
+42,7
@@
namespace System.Xml.Serialization
XmlTypeMapElementInfoList _elementInfo;
string _choiceMember;
bool _isTextCollector;
XmlTypeMapElementInfoList _elementInfo;
string _choiceMember;
bool _isTextCollector;
+ TypeData _choiceTypeData;
public XmlTypeMapMemberElement()
{
public XmlTypeMapMemberElement()
{
@@
-63,6
+64,12
@@
namespace System.Xml.Serialization
set { _choiceMember = value; }
}
set { _choiceMember = value; }
}
+ public TypeData ChoiceTypeData
+ {
+ get { return _choiceTypeData; }
+ set { _choiceTypeData = value; }
+ }
+
public XmlTypeMapElementInfo FindElement (object ob, object memberValue)
{
if (_elementInfo.Count == 1)
public XmlTypeMapElementInfo FindElement (object ob, object memberValue)
{
if (_elementInfo.Count == 1)
@@
-77,9
+84,8
@@
namespace System.Xml.Serialization
{
if (memberValue == null)
return (XmlTypeMapElementInfo) _elementInfo[0];
{
if (memberValue == null)
return (XmlTypeMapElementInfo) _elementInfo[0];
- Type type = memberValue.GetType();
foreach (XmlTypeMapElementInfo elem in _elementInfo)
foreach (XmlTypeMapElementInfo elem in _elementInfo)
- if (elem.TypeData.Type
== type
) return elem;
+ if (elem.TypeData.Type
.IsInstanceOfType (memberValue)
) return elem;
}
return null;
}
}
return null;
}