Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteWhitespace() [1/2]

override void System.Runtime.Serialization.Json.XmlJsonWriter.WriteWhitespace ( string ws)
inline

Definition at line 1044 of file XmlJsonWriter.cs.

1045 {
1046 if (IsClosed)
1047 {
1048 ThrowClosed();
1049 }
1050 if (ws == null)
1051 {
1052 throw new ArgumentNullException("ws");
1053 }
1054 for (int i = 0; i < ws.Length; i++)
1055 {
1056 char c = ws[i];
1057 if (c != ' ' && c != '\t' && c != '\n' && c != '\r')
1058 {
1059 throw new ArgumentException(System.SR.Format(System.SR.JsonOnlyWhitespace, c.ToString(), "WriteWhitespace"), "ws");
1060 }
1061 }
1062 WriteString(ws);
1063 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string JsonOnlyWhitespace
Definition SR.cs:594
Definition SR.cs:7

References System.Xml.ArgumentException, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.Runtime.Serialization.Json.XmlJsonWriter.IsClosed, System.SR.JsonOnlyWhitespace, System.Runtime.Serialization.Json.XmlJsonWriter.ThrowClosed(), and System.Runtime.Serialization.Json.XmlJsonWriter.WriteString().