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

◆ TryReadReverse()

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

Definition at line 7 of file DotAtomReader.cs.

8 {
9 int num = index;
10 while (0 <= index && (data[index] > '\u007f' || data[index] == '.' || MailBnfHelper.Atext[(uint)data[index]]))
11 {
12 index--;
13 }
14 if (num == index)
15 {
16 if (throwExceptionIfFail)
17 {
18 throw new FormatException(System.SR.Format(System.SR.MailHeaderFieldInvalidCharacter, data[index]));
19 }
20 outIndex = 0;
21 return false;
22 }
23 if (data[index + 1] == '.')
24 {
25 if (throwExceptionIfFail)
26 {
27 throw new FormatException(System.SR.Format(System.SR.MailHeaderFieldInvalidCharacter, '.'));
28 }
29 outIndex = 0;
30 return false;
31 }
32 outIndex = index;
33 return true;
34 }
static readonly bool[] Atext
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string MailHeaderFieldInvalidCharacter
Definition SR.cs:140
Definition SR.cs:7

References System.Net.Mime.MailBnfHelper.Atext, System.SR.Format(), System.index, and System.SR.MailHeaderFieldInvalidCharacter.

Referenced by System.Net.Mail.MailAddressParser.TryParseDomain(), and System.Net.Mail.MailAddressParser.TryParseLocalPart().