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

◆ TryReadFwsReverse()

static bool System.Net.Mail.WhitespaceReader.TryReadFwsReverse ( string data,
int index,
out int outIndex,
bool throwExceptionIfFail )
inlinestaticpackage

Definition at line 7 of file WhitespaceReader.cs.

8 {
9 bool flag = false;
10 while (index >= 0)
11 {
12 if (data[index] == '\r' && flag)
13 {
14 flag = false;
15 }
16 else
17 {
18 if (data[index] == '\r' || flag)
19 {
20 if (throwExceptionIfFail)
21 {
22 throw new FormatException(System.SR.MailAddressInvalidFormat);
23 }
24 outIndex = 0;
25 return false;
26 }
27 if (data[index] == '\n')
28 {
29 flag = true;
30 }
31 else if (data[index] != ' ' && data[index] != '\t')
32 {
33 break;
34 }
35 }
36 index--;
37 }
38 if (flag)
39 {
40 if (throwExceptionIfFail)
41 {
42 throw new FormatException(System.SR.MailAddressInvalidFormat);
43 }
44 outIndex = 0;
45 return false;
46 }
47 outIndex = index;
48 return true;
49 }
static string MailAddressInvalidFormat
Definition SR.cs:148
Definition SR.cs:7

References System.index, and System.SR.MailAddressInvalidFormat.

Referenced by System.Net.Mail.MailAddressParser.TryParseAddress(), System.Net.Mail.WhitespaceReader.TryReadCfwsReverse(), System.Net.Mail.DomainLiteralReader.TryReadReverse(), System.Net.Mail.QuotedStringFormatReader.TryReadReverseQuoted(), and System.Net.Mail.QuotedStringFormatReader.TryReadReverseUnQuoted().