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

◆ ReadToken()

static string System.Net.Mime.MailBnfHelper.ReadToken ( string data,
ref int offset,
StringBuilder builder )
inlinestaticpackage

Definition at line 298 of file MailBnfHelper.cs.

299 {
300 int num = offset;
301 while (offset < data.Length)
302 {
303 if (data[offset] > '\u007f')
304 {
305 throw new FormatException(System.SR.Format(System.SR.MailHeaderFieldInvalidCharacter, data[offset]));
306 }
307 if (!Ttext[(uint)data[offset]])
308 {
309 break;
310 }
311 offset++;
312 }
313 if (num == offset && offset < data.Length)
314 {
315 throw new FormatException(System.SR.Format(System.SR.MailHeaderFieldInvalidCharacter, data[offset]));
316 }
317 return data.Substring(num, offset - num);
318 }
static readonly bool[] Ttext
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string MailHeaderFieldInvalidCharacter
Definition SR.cs:140
Definition SR.cs:7

References System.SR.Format(), System.SR.MailHeaderFieldInvalidCharacter, System.offset, and System.Net.Mime.MailBnfHelper.Ttext.

Referenced by System.Net.Mime.ContentDisposition.ParseValue(), System.Net.Mime.ContentType.ParseValue(), System.Net.Mime.MailBnfHelper.ReadParameterAttribute(), and System.Net.Mail.AttachmentBase.SetContentFromString().