projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62537fd
)
Fix bug #2956: XmlReader.HasValue became virtual (from abstract) in .NET 4.
author
Atsushi Eno
<atsushi@ximian.com>
Thu, 19 Jan 2012 09:52:36 +0000
(18:52 +0900)
committer
Atsushi Eno
<atsushi@ximian.com>
Thu, 19 Jan 2012 09:52:36 +0000
(18:52 +0900)
mcs/class/System.XML/System.Xml/XmlReader.cs
patch
|
blob
|
history
diff --git
a/mcs/class/System.XML/System.Xml/XmlReader.cs
b/mcs/class/System.XML/System.Xml/XmlReader.cs
index e6fbe57ab2e44145d121125b48aafd321782aa46..f5434ec7cf396e1989a8a4124e24459f2e63a7f4 100644
(file)
--- a/
mcs/class/System.XML/System.Xml/XmlReader.cs
+++ b/
mcs/class/System.XML/System.Xml/XmlReader.cs
@@
-123,7
+123,26
@@
namespace System.Xml
get { return AttributeCount > 0; }
}
get { return AttributeCount > 0; }
}
+#if NET_4_0
+ public virtual bool HasValue {
+ get {
+ switch (NodeType) {
+ case XmlNodeType.Attribute:
+ case XmlNodeType.Comment:
+ case XmlNodeType.ProcessingInstruction:
+ case XmlNodeType.SignificantWhitespace:
+ case XmlNodeType.CDATA:
+ case XmlNodeType.Text:
+ case XmlNodeType.Whitespace:
+ case XmlNodeType.XmlDeclaration:
+ return true;
+ }
+ return false;
+ }
+ }
+#else
public abstract bool HasValue { get; }
public abstract bool HasValue { get; }
+#endif
public abstract bool IsEmptyElement { get; }
public abstract bool IsEmptyElement { get; }