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