Skip to content

Commit e1b2f98

Browse files
authored
Merge pull request #1101 from Unity-Technologies/implement-read-string
Implement a ReadString overload (case 1106236)
2 parents 764f57f + 26aa0ea commit e1b2f98

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReader.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1193,10 +1193,15 @@ protected Exception CreateMissingIXmlSerializableType (string name, string ns, s
11931193
throw new NotImplementedException ();
11941194
}
11951195

1196-
[MonoTODO]
11971196
protected string ReadString (string value, bool trim)
11981197
{
1199-
throw new NotImplementedException ();
1198+
readCount++;
1199+
string str = reader.ReadString ();
1200+
if (str != null && trim)
1201+
str = str.Trim();
1202+
if (value == null || value.Length == 0)
1203+
return str;
1204+
return value + str;
12001205
}
12011206

12021207
[MonoTODO]

0 commit comments

Comments
 (0)