83 references to MailBnfHelper
System (83)
net\System\Net\mail\Attachment.cs (2)
160
string value =
MailBnfHelper
.ReadToken(mediaType, ref offset, null);
163
value =
MailBnfHelper
.ReadToken(mediaType, ref offset, null);
net\System\Net\mail\BaseWriter.cs (3)
71
if (
MailBnfHelper
.IsFWSAt(value, index)) // At the first char of "\r\n " or "\r\n\t"
90
else if (value[index] ==
MailBnfHelper
.Space || value[index] ==
MailBnfHelper
.Tab)
net\System\Net\mail\ContentDisposition.cs (9)
307
else if ((allowUnicode && !
MailBnfHelper
.HasCROrLF(value)) // Unicode without CL or LF's
310
MailBnfHelper
.GetTokenOrQuotedString(value, builder, allowUnicode);
341
dispositionType =
MailBnfHelper
.ReadToken(disposition, ref offset, null);
360
while (
MailBnfHelper
.SkipCFWS(disposition, ref offset))
367
if (!
MailBnfHelper
.SkipCFWS(disposition, ref offset))
370
string paramAttribute =
MailBnfHelper
.ReadParameterAttribute(disposition, ref offset, null);
379
if (!
MailBnfHelper
.SkipCFWS(disposition, ref offset))
388
paramValue =
MailBnfHelper
.ReadQuotedString(disposition, ref offset, null);
392
paramValue =
MailBnfHelper
.ReadToken(disposition, ref offset, null);
net\System\Net\mail\ContentType.cs (12)
122
mediaType =
MailBnfHelper
.ReadToken(value, ref offset, null);
126
subType =
MailBnfHelper
.ReadToken(value, ref offset, null);
228
else if ((allowUnicode && !
MailBnfHelper
.HasCROrLF(value)) // Unicode without CL or LF's
231
MailBnfHelper
.GetTokenOrQuotedString(value, builder, allowUnicode);
263
mediaType =
MailBnfHelper
.ReadToken(type, ref offset, null);
269
subType =
MailBnfHelper
.ReadToken(type, ref offset, null);
276
while (
MailBnfHelper
.SkipCFWS(type, ref offset))
283
if (!
MailBnfHelper
.SkipCFWS(type, ref offset))
286
string paramAttribute =
MailBnfHelper
.ReadParameterAttribute(type, ref offset, null);
299
if (!
MailBnfHelper
.SkipCFWS(type, ref offset)){
305
paramValue =
MailBnfHelper
.ReadQuotedString(type, ref offset, null);
307
paramValue =
MailBnfHelper
.ReadToken(type, ref offset, null);
net\System\Net\mail\DomainLiteralReader.cs (5)
38
Debug.Assert(data[index] ==
MailBnfHelper
.EndSquareBracket, "data did not end with a square bracket");
59
else if (data[index] ==
MailBnfHelper
.StartSquareBracket)
65
else if (data[index] >
MailBnfHelper
.Ascii7bitMaxValue || !
MailBnfHelper
.Dtext[data[index]])
79
MailBnfHelper
.EndSquareBracket));
net\System\Net\mail\DotAtomReader.cs (5)
50
if (data[index] <=
MailBnfHelper
.Ascii7bitMaxValue // Any Unicode allowed
51
&& (data[index] !=
MailBnfHelper
.Dot && !
MailBnfHelper
.Atext[data[index]])) // Invalid char
63
else if (data[index + 1] ==
MailBnfHelper
.Dot)
65
throw new FormatException(SR.GetString(SR.MailHeaderFieldInvalidCharacter,
MailBnfHelper
.Dot));
net\System\Net\mail\HeaderCollection.cs (1)
150
MailBnfHelper
.ValidateHeaderName(name);
net\System\Net\mail\MailAddressParser.cs (17)
51
Debug.Assert(index == -1 || data[index] ==
MailBnfHelper
.Comma,
87
if (data[index] ==
MailBnfHelper
.EndAngleBracket)
96
if (data[index] !=
MailBnfHelper
.At)
109
if (index >= 0 && data[index] ==
MailBnfHelper
.StartAngleBracket)
119
(index >= 0 ? data[index] :
MailBnfHelper
.EndAngleBracket)));
125
if (index >= 0 && !(expectMultipleAddresses && data[index] ==
MailBnfHelper
.Comma))
173
if (data[index] ==
MailBnfHelper
.EndSquareBracket)
215
if (data[index] ==
MailBnfHelper
.Quote)
228
MailBnfHelper
.Whitespace.Contains(data[index]) // < local@domain >
229
|| data[index] ==
MailBnfHelper
.EndComment // <(comment)local@domain>
230
|| (expectAngleBracket && data[index] ==
MailBnfHelper
.StartAngleBracket) // <local@domain>
231
|| (expectMultipleAddresses && data[index] ==
MailBnfHelper
.Comma) // local@dom,local@dom
234
|| data[index] ==
MailBnfHelper
.Quote // "display"local@domain
277
if (firstNonCommentIndex >= 0 && data[firstNonCommentIndex] ==
MailBnfHelper
.Quote)
282
Debug.Assert(data[index + 1] ==
MailBnfHelper
.Quote, "Mis-alligned index: " + index);
293
if (index >= 0 && !(expectMultipleAddresses && data[index] ==
MailBnfHelper
.Comma))
307
Debug.Assert(index < 0 || data[index] ==
MailBnfHelper
.Comma, "Mis-alligned index: " + index);
net\System\Net\mail\MailBnfHelper.cs (4)
377
return (data[index] ==
MailBnfHelper
.CR
379
&& data[index + 1] ==
MailBnfHelper
.LF
380
&& (data[index + 2] ==
MailBnfHelper
.Space
381
|| data[index + 2] ==
MailBnfHelper
.Tab));
net\System\Net\mail\Message.cs (3)
167
if (value != null &&
MailBnfHelper
.HasCROrLF(value)) {
433
MailBnfHelper
.GetDateTimeString(DateTime.Now, null));
479
&& !
MailBnfHelper
.HasCROrLF(values[j]))) {
net\System\Net\mail\QuotedPairReader.cs (5)
43
if (index <= 0 || data[index - 1] !=
MailBnfHelper
.Backslash)
58
if (!permitUnicodeEscaping && data[index] >
MailBnfHelper
.Ascii7bitMaxValue)
78
Debug.Assert(index >= 0 && data[index] ==
MailBnfHelper
.Backslash, "index was not a backslash: " + index);
86
} while (index >= 0 && data[index] ==
MailBnfHelper
.Backslash);
89
Debug.Assert(index < 0 || data[index] !=
MailBnfHelper
.Backslash, "index was a backslash: " + index);
net\System\Net\mail\QuotedStringFormatReader.cs (6)
43
Debug.Assert(data[index] ==
MailBnfHelper
.Quote, "Initial char at index " + index + " was not a quote.");
65
else if (data[index] ==
MailBnfHelper
.Quote)
84
throw new FormatException(SR.GetString(SR.MailHeaderFieldInvalidCharacter,
MailBnfHelper
.Quote));
122
else if (expectCommaDelimiter && data[index] ==
MailBnfHelper
.Comma)
146
if (ch >
MailBnfHelper
.Ascii7bitMaxValue)
152
return
MailBnfHelper
.Qtext[ch];
net\System\Net\mail\WhitespaceReader.cs (11)
47
if (data[index] ==
MailBnfHelper
.CR && expectCR)
52
else if (data[index] ==
MailBnfHelper
.CR || expectCR)
58
else if (data[index] ==
MailBnfHelper
.LF)
63
else if (data[index] ==
MailBnfHelper
.Space || data[index] ==
MailBnfHelper
.Tab)
121
else if (data[index] ==
MailBnfHelper
.EndComment)
127
else if (data[index] ==
MailBnfHelper
.StartComment)
134
MailBnfHelper
.StartComment));
140
&& (data[index] >
MailBnfHelper
.Ascii7bitMaxValue ||
MailBnfHelper
.Ctext[data[index]]))
162
throw new FormatException(SR.GetString(SR.MailHeaderFieldInvalidCharacter,
MailBnfHelper
.EndComment));