Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DomainLiteralReader.cs
Go to the documentation of this file.
1
using
System.Net.Mime
;
2
3
namespace
System.Net.Mail
;
4
5
internal
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
{
40
throw
new
FormatException
(
System
.
SR
.
Format
(
System
.
SR
.
MailHeaderFieldInvalidCharacter
, data[
index
]));
41
}
42
outIndex = 0;
43
return
false
;
44
}
45
index
--;
46
}
47
while
(
index
>= 0);
48
if
(throwExceptionIfFail)
49
{
50
throw
new
FormatException
(
System
.
SR
.
Format
(
System
.
SR
.
MailHeaderFieldInvalidCharacter
,
']'
));
51
}
52
outIndex = 0;
53
return
false
;
54
}
55
}
System.FormatException
Definition
FormatException.cs:9
System.Net.Mail.DomainLiteralReader.TryReadReverse
static bool TryReadReverse(string data, int index, out int outIndex, bool throwExceptionIfFail)
Definition
DomainLiteralReader.cs:7
System.Net.Mail.DomainLiteralReader
Definition
DomainLiteralReader.cs:6
System.Net.Mail.QuotedPairReader.TryCountQuotedChars
static bool TryCountQuotedChars(string data, int index, bool permitUnicodeEscaping, out int outIndex, bool throwExceptionIfFail)
Definition
QuotedPairReader.cs:5
System.Net.Mail.QuotedPairReader
Definition
QuotedPairReader.cs:4
System.Net.Mail.WhitespaceReader.TryReadFwsReverse
static bool TryReadFwsReverse(string data, int index, out int outIndex, bool throwExceptionIfFail)
Definition
WhitespaceReader.cs:7
System.Net.Mail.WhitespaceReader
Definition
WhitespaceReader.cs:6
System.Net.Mime.MailBnfHelper.Dtext
static readonly bool[] Dtext
Definition
MailBnfHelper.cs:11
System.Net.Mime.MailBnfHelper
Definition
MailBnfHelper.cs:6
System.SR.Format
static string Format(string resourceFormat, object p1)
Definition
SR.cs:118
System.SR.MailHeaderFieldInvalidCharacter
static string MailHeaderFieldInvalidCharacter
Definition
SR.cs:140
System.SR
Definition
SR.cs:7
System.Net.Mail
Definition
AlternateView.cs:5
System.Net.Mime
Definition
Base64Encoder.cs:1
System.ExceptionArgument.index
@ index
System
Definition
BlockingCollection.cs:8
source
System.Net.Mail
System.Net.Mail
DomainLiteralReader.cs
Generated by
1.10.0