19 private static readonly
string[]
s_months =
new string[13]
21 null,
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
27 bool[]
array =
new bool[128];
28 for (
int i = 48; i <= 57; i++)
32 for (
int j = 65; j <= 90; j++)
36 for (
int k = 97; k <= 122; k++)
64 bool[]
array =
new bool[128];
65 for (
int i = 1; i <= 9; i++)
71 for (
int j = 14; j <= 33; j++)
75 for (
int k = 35; k <= 91; k++)
79 for (
int l = 93; l <= 127; l++)
88 bool[]
array =
new bool[128];
89 for (
int i = 1; i <= 8; i++)
95 for (
int j = 14; j <= 31; j++)
99 for (
int k = 33; k <= 90; k++)
103 for (
int l = 94; l <= 127; l++)
112 bool[]
array =
new bool[128];
113 for (
int i = 33; i <= 57; i++)
117 for (
int j = 59; j <= 126; j++)
126 bool[]
array =
new bool[128];
127 for (
int i = 33; i <= 126; i++)
151 bool[]
array =
new bool[128];
152 for (
int i = 1; i <= 8; i++)
158 for (
int j = 14; j <= 31; j++)
162 for (
int k = 33; k <= 39; k++)
166 for (
int l = 42; l <= 91; l++)
170 for (
int m = 93; m <= 127; m++)
180 while (
offset < data.Length)
182 if (data[
offset] >
'\u007f')
186 if (data[
offset] ==
'\\' && num > 0)
190 else if (data[
offset] ==
'(')
194 else if (data[
offset] ==
')')
198 else if (data[
offset] !=
' ' && data[
offset] !=
'\t' && num == 0)
214 for (i = 0; i < data.Length; i++)
216 if (data[i] >
Ftext.Length || !
Ftext[(uint)data[i]])
229 return ReadQuotedString(data, ref
offset, builder, doesntRequireQuotes:
false, permitUnicodeInDisplayName:
false);
234 if (!doesntRequireQuotes)
240 while (
offset < data.Length)
263 else if (permitUnicodeInDisplayName)
277 if (doesntRequireQuotes)
301 while (
offset < data.Length)
303 if (data[
offset] >
'\u007f')
317 return data.Substring(num,
offset - num);
324 stringBuilder.
Append(
' ');
326 stringBuilder.
Append(
' ');
328 stringBuilder.
Append(
' ');
331 stringBuilder.
Append(
'0');
334 stringBuilder.
Append(
':');
335 if (
value.Minute <= 9)
337 stringBuilder.
Append(
'0');
340 stringBuilder.
Append(
':');
341 if (
value.Second <= 9)
343 stringBuilder.
Append(
'0');
349 stringBuilder.
Append(
" +");
353 stringBuilder.
Append(
' ');
369 for (; i < data.Length; i++)
376 for (; i < data.Length; i++)
384 else if (!
Qtext[(uint)data[i]])
386 builder.
Append(data, num, i - num);
392 builder.
Append(data, num, i - num);
396 if (data.Length == 0)
418 if (c !=
'\t' && c !=
' ' && c !=
'\r')
427 for (
int i = 0; i < data.Length; i++)
429 if (data[i] ==
'\r' || data[i] ==
'\n')
439 if (data[
index] ==
'\r' &&
index + 2 < data.Length && data[
index + 1] ==
'\n')
441 if (data[
index + 2] !=
' ')
443 return data[
index + 2] ==
'\t';
static string GetDateTimeString(DateTime value, StringBuilder builder)
static bool IsFWSAt(string data, int index)
static void ValidateHeaderName(string data)
static readonly bool[] Ftext
static bool[] CreateCharactersAllowedInAtoms()
static bool HasCROrLF(string data)
static bool CheckForUnicode(char ch, bool allowUnicode)
static readonly string[] s_months
static bool[] CreateCharactersAllowedInQuotedStrings()
static readonly bool[] Dtext
static bool[] CreateCharactersAllowedInHeaderNames()
static readonly bool[] Qtext
static string ReadToken(string data, ref int offset, StringBuilder builder)
static readonly bool[] Ttext
static bool[] CreateCharactersAllowedInDomainLiterals()
static readonly bool[] Atext
static string ReadQuotedString(string data, ref int offset, StringBuilder builder)
static bool IsAllowedWhiteSpace(char c)
static void GetTokenOrQuotedString(string data, StringBuilder builder, bool allowUnicode)
static readonly bool[] Ctext
static string ReadParameterAttribute(string data, ref int offset, StringBuilder builder)
static bool[] CreateCharactersAllowedInTokens()
static bool[] CreateCharactersAllowedInComments()
static string ReadQuotedString(string data, ref int offset, StringBuilder builder, bool doesntRequireQuotes, bool permitUnicodeInDisplayName)
static bool SkipCFWS(string data, ref int offset)
static string Format(string resourceFormat, object p1)
static string MailHeaderFieldMalformedHeader
static string InvalidHeaderName
static string MailHeaderFieldInvalidCharacter
override string ToString()
StringBuilder Append(char value, int repeatCount)
static TimeZoneInfo Local