Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DomainLiteralReader.cs
Go to the documentation of this file.
2
3namespace System.Net.Mail;
4
5internal static class DomainLiteralReader
6{
7 internal static bool TryReadReverse(string data, int index, out int outIndex, bool throwExceptionIfFail)
8 {
9 index--;
10 do
11 {
12 if (!WhitespaceReader.TryReadFwsReverse(data, index, out index, throwExceptionIfFail))
13 {
14 outIndex = 0;
15 return false;
16 }
17 if (index < 0)
18 {
19 break;
20 }
21 if (!QuotedPairReader.TryCountQuotedChars(data, index, permitUnicodeEscaping: false, out var outIndex2, throwExceptionIfFail))
22 {
23 outIndex = 0;
24 return false;
25 }
26 if (outIndex2 > 0)
27 {
28 index -= outIndex2;
29 continue;
30 }
31 if (data[index] == '[')
32 {
33 outIndex = index - 1;
34 return true;
35 }
36 if (data[index] > '\u007f' || !MailBnfHelper.Dtext[(uint)data[index]])
37 {
38 if (throwExceptionIfFail)
39 {
41 }
42 outIndex = 0;
43 return false;
44 }
45 index--;
46 }
47 while (index >= 0);
48 if (throwExceptionIfFail)
49 {
51 }
52 outIndex = 0;
53 return false;
54 }
55}
static bool TryReadReverse(string data, int index, out int outIndex, bool throwExceptionIfFail)
static bool TryCountQuotedChars(string data, int index, bool permitUnicodeEscaping, out int outIndex, bool throwExceptionIfFail)
static bool TryReadFwsReverse(string data, int index, out int outIndex, bool throwExceptionIfFail)
static readonly bool[] Dtext
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string MailHeaderFieldInvalidCharacter
Definition SR.cs:140
Definition SR.cs:7