2 types derived from MimeBasePart
System.Net.Mail (2)
System\Net\Mime\MimeMultiPart.cs (1)
13
internal sealed class MimeMultiPart :
MimeBasePart
System\Net\Mime\MimePart.cs (1)
17
internal sealed class MimePart :
MimeBasePart
, IDisposable
58 references to MimeBasePart
System.Net.Mail (58)
System\Net\Mail\Attachment.cs (12)
99
if (
MimeBasePart
.IsAscii(content, false))
105
encoding = Text.Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
111
if (
MimeBasePart
.ShouldUseBase64Encoding(encoding))
155
if (
MimeBasePart
.IsAscii(content, false))
161
encoding = Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
169
if (
MimeBasePart
.ShouldUseBase64Encoding(encoding))
344
if (!allowUnicode && !string.IsNullOrEmpty(_name) && !
MimeBasePart
.IsAscii(_name, false))
346
Encoding encoding = NameEncoding ?? Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
347
MimePart.ContentType.Name =
MimeBasePart
.EncodeHeaderValue(_name, encoding,
MimeBasePart
.ShouldUseBase64Encoding(encoding));
363
Encoding? nameEncoding =
MimeBasePart
.DecodeEncoding(value);
367
_name =
MimeBasePart
.DecodeHeaderValue(value);
System\Net\Mail\MailAddress.cs (5)
32
_displayNameEncoding = displayNameEncoding ?? Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
132
displayNameEncoding ??= Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
187
if (!allowUnicode && !
MimeBasePart
.IsAscii(_userName, true))
207
if (!allowUnicode && !
MimeBasePart
.IsAscii(domain, true))
300
if (
MimeBasePart
.IsAscii(_displayName, false) || allowUnicode)
System\Net\Mail\MailMessage.cs (2)
226
if (
MimeBasePart
.IsAscii(_body, true))
232
_bodyEncoding = Text.Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
System\Net\Mail\MailPriority.cs (14)
29
private
MimeBasePart
? _content;
140
inputEncoding =
MimeBasePart
.DecodeEncoding(value);
149
value =
MimeBasePart
.DecodeHeaderValue(value);
165
if (_subjectEncoding == null && !
MimeBasePart
.IsAscii(_subject, false))
167
_subjectEncoding = Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
226
internal
MimeBasePart
? Content
353
_headersEncoding ??= Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
384
_headersEncoding ??= Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
475
MimeBasePart
.EncodeHeaderValue(_subject, _subjectEncoding,
476
MimeBasePart
.ShouldUseBase64Encoding(_subjectEncoding),
490
_headersEncoding ??= Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
512
if (
MimeBasePart
.IsAscii(values[j], false)
520
encodedValue =
MimeBasePart
.EncodeHeaderValue(values[j],
522
MimeBasePart
.ShouldUseBase64Encoding(_headersEncoding),
System\Net\Mime\ContentDisposition.cs (5)
226
Encoding? encoding =
MimeBasePart
.DecodeEncoding(value);
232
||
MimeBasePart
.IsAscii(value, false)) // Ascii
239
encoding = Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
240
builder.Append('"').Append(
MimeBasePart
.EncodeHeaderValue(value, encoding,
MimeBasePart
.ShouldUseBase64Encoding(encoding))).Append('"');
System\Net\Mime\ContentType.cs (7)
119
Encoding? nameEncoding =
MimeBasePart
.DecodeEncoding(value);
122
value =
MimeBasePart
.DecodeHeaderValue(value);
194
Encoding? encoding =
MimeBasePart
.DecodeEncoding(value);
200
||
MimeBasePart
.IsAscii(value, false)) // Ascii
207
encoding = Encoding.GetEncoding(
MimeBasePart
.DefaultCharSet);
208
builder.Append('"').Append(
MimeBasePart
.EncodeHeaderValue(value, encoding,
MimeBasePart
.ShouldUseBase64Encoding(encoding))).Append('"');
System\Net\Mime\HeaderCollection.cs (1)
75
if (!
MimeBasePart
.IsAscii(name, false))
System\Net\Mime\MimeBasePart.cs (1)
226
internal MimePartAsyncResult(
MimeBasePart
part, object? state, AsyncCallback? callback) : base(part, state, callback)
System\Net\Mime\MimeMultiPart.cs (11)
15
private Collection<
MimeBasePart
>? _parts;
43
internal Collection<
MimeBasePart
> Parts => _parts ??= new Collection<
MimeBasePart
>();
118
MimeBasePart
part = (
MimeBasePart
)context._partsEnumerator.Current;
123
part = (
MimeBasePart
)context._partsEnumerator.Current;
167
MimeBasePart
part = (
MimeBasePart
)context._partsEnumerator.Current;
205
internal MimePartContext(BaseWriter writer, LazyAsyncResult result, IEnumerator<
MimeBasePart
> partsEnumerator)
212
internal IEnumerator<
MimeBasePart
> _partsEnumerator;
227
foreach (
MimeBasePart
part in Parts)