143 if (mimeType !=
null && mimeType !=
string.
Empty)
147 if (name !=
null && name !=
string.
Empty)
149 base.ContentType.Name = name;
185 mimePartContext._completed =
true;
186 mimePartContext.
_result.InvokeCallback(e);
304 writer.WriteHeaders(base.Headers, allowUnicode);
321 byte[]
buffer =
new byte[17408];
323 writer.WriteHeaders(base.Headers, allowUnicode);
333 contentStream.
Close();
long Seek(long offset, SeekOrigin origin)
virtual void EndWrite(IAsyncResult asyncResult)
int Read(byte[] buffer, int offset, int count)
void Write(byte[] buffer, int offset, int count)
virtual IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
virtual IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
virtual int EndRead(IAsyncResult asyncResult)
Stream EndGetContentStream(IAsyncResult result)
void PersistIfNeeded(HeaderCollection headers, bool forcePersist)
ContentDisposition _contentDisposition
void PrepareHeaders(bool allowUnicode)
System.Net.LazyAsyncResult _result
MimePartContext(BaseWriter writer, System.Net.LazyAsyncResult result)
bool _completedSynchronously
void SetContent(Stream stream, ContentType contentType)
AsyncCallback _readCallback
void SetContent(Stream stream, string name, string mimeType)
void Complete(IAsyncResult result, Exception e)
void ReadCallbackHandler(IAsyncResult result)
AsyncCallback _writeCallback
void ContentStreamCallbackHandler(IAsyncResult result)
override IAsyncResult BeginSend(BaseWriter writer, AsyncCallback callback, bool allowUnicode, object state)
override void Send(BaseWriter writer, bool allowUnicode)
void WriteCallback(IAsyncResult result)
void ContentStreamCallback(IAsyncResult result)
void SetContent(Stream stream)
Stream GetEncodedStream(Stream stream)
void WriteCallbackHandler(IAsyncResult result)
void ReadCallback(IAsyncResult result)
static string MimePartCantResetStream
static string Format(string resourceFormat, object p1)
static string MimeTransferEncodingNotSupported
bool CompletedSynchronously