Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MailWriter.cs
Go to the documentation of this file.
2using System.IO;
4
5namespace System.Net.Mail;
6
7internal sealed class MailWriter : BaseWriter
8{
9 internal MailWriter(Stream stream, bool encodeForTransport)
10 : base(stream, encodeForTransport)
11 {
12 }
13
14 internal override void WriteHeaders(NameValueCollection headers, bool allowUnicode)
15 {
16 if (headers == null)
17 {
18 throw new ArgumentNullException("headers");
19 }
20 foreach (string header in headers)
21 {
22 string[] values = headers.GetValues(header);
23 string[] array = values;
24 foreach (string value in array)
25 {
26 WriteHeader(header, value, allowUnicode);
27 }
28 }
29 }
30
31 internal override void Close()
32 {
34 Flush(null);
35 _stream.Close();
36 }
37
38 protected override void OnClose(object sender, EventArgs args)
39 {
41 _contentStream = null;
42 }
43}
virtual void Close()
Definition Stream.cs:644
override void WriteHeaders(NameValueCollection headers, bool allowUnicode)
Definition MailWriter.cs:14
override void OnClose(object sender, EventArgs args)
Definition MailWriter.cs:38
MailWriter(Stream stream, bool encodeForTransport)
Definition MailWriter.cs:9
override void Close()
Definition MailWriter.cs:31
readonly Stream _stream
Definition BaseWriter.cs:16
void WriteHeader(string name, string value, bool allowUnicode)
Definition BaseWriter.cs:43
static readonly byte[] s_crlf
Definition BaseWriter.cs:12
readonly BufferBuilder _bufferBuilder
Definition BaseWriter.cs:14
void Flush(MultiAsyncResult multiResult)