Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.XML/System.Xml/XmlWriter.cs')
-rw-r--r--mcs/class/System.XML/System.Xml/XmlWriter.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/mcs/class/System.XML/System.Xml/XmlWriter.cs b/mcs/class/System.XML/System.Xml/XmlWriter.cs
index 0010ce4c0da..3870f7e7df6 100644
--- a/mcs/class/System.XML/System.Xml/XmlWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriter.cs
@@ -360,19 +360,16 @@ namespace System.Xml
internal virtual void WriteNmTokenInternal (string name)
{
- bool valid = true;
#if NET_2_0
switch (Settings.ConformanceLevel) {
case ConformanceLevel.Document:
case ConformanceLevel.Fragment:
- valid = XmlChar.IsNmToken (name);
- break;
+ XmlConvert.VerifyNMTOKEN (name);
+ break;
}
#else
- valid = XmlChar.IsNmToken (name);
+ XmlConvert.VerifyNMTOKEN (name);
#endif
- if (!valid)
- throw new ArgumentException ("Argument name is not a valid NMTOKEN.");
WriteString (name);
}