Aspose::Email::Storage::Mbox::MboxStorageWriter Class Referenceabstract

A base class for any mbox-based mail storage writer. More...

Inherits IDisposable.

Inherited by Aspose::Email::Storage::Mbox::FINAL.

Public Member Functions

ASPOSE_EMAIL_SHARED_API System::SharedPtr< System::IO::Stream > get_BaseStream () const
 Gets the base stream. More...
 
virtual ASPOSE_EMAIL_SHARED_API void WriteMessage (System::SharedPtr< MailMessage > message)=0
 Writes the message to underlying storage stream. More...
 
virtual ASPOSE_EMAIL_SHARED_API void WriteMessage (System::SharedPtr< MailMessage > message, System::String &fromMarker)=0
 Writes the message to underlying storage stream. More...
 
ASPOSE_EMAIL_SHARED_API void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 

Protected Member Functions

ASPOSE_EMAIL_SHARED_API MboxStorageWriter (System::SharedPtr< System::IO::Stream > stream, bool leaveOpen)
 Initializes a new instance of the MboxStorageWriter class. More...
 
ASPOSE_EMAIL_SHARED_API MboxStorageWriter (System::String fileName, bool leaveOpen)
 Initializes a new instance of the MboxStorageWriter class. More...
 
virtual ASPOSE_EMAIL_SHARED_API void Dispose (bool disposing)
 Releases unmanaged and - optionally - managed resources More...
 

Friends

class Aspose::Email::Storage::Mbox::MboxrdStorageWriter
 

Detailed Description

A base class for any mbox-based mail storage writer.

Constructor & Destructor Documentation

◆ MboxStorageWriter() [1/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Storage::Mbox::MboxStorageWriter::MboxStorageWriter ( System::SharedPtr< System::IO::Stream >  stream,
bool  leaveOpen 
)
protected

Initializes a new instance of the MboxStorageWriter class.

Parameters
streamThe stream.
leaveOpenif set to true leaves the underlying stream open after disposing.
Exceptions
ArgumentNullExceptionIf given stream is null.

◆ MboxStorageWriter() [2/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Storage::Mbox::MboxStorageWriter::MboxStorageWriter ( System::String  fileName,
bool  leaveOpen 
)
protected

Initializes a new instance of the MboxStorageWriter class.

Parameters
fileNameName of the file.
leaveOpenif set to true leaves the underlying stream open after disposing.
Exceptions
ArgumentNullExceptionIf filename is null or empty.

Member Function Documentation

◆ Dispose() [1/2]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageWriter::Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ Dispose() [2/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageWriter::Dispose ( bool  disposing)
protectedvirtual

Releases unmanaged and - optionally - managed resources

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

◆ get_BaseStream()

ASPOSE_EMAIL_SHARED_API System::SharedPtr<System::IO::Stream> Aspose::Email::Storage::Mbox::MboxStorageWriter::get_BaseStream ( ) const

Gets the base stream.

The base stream.

◆ WriteMessage() [1/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageWriter::WriteMessage ( System::SharedPtr< MailMessage message)
pure virtual

Writes the message to underlying storage stream.

Parameters
messageThe message to write to.

◆ WriteMessage() [2/2]

virtual ASPOSE_EMAIL_SHARED_API void Aspose::Email::Storage::Mbox::MboxStorageWriter::WriteMessage ( System::SharedPtr< MailMessage message,
System::String &  fromMarker 
)
pure virtual

Writes the message to underlying storage stream.

Parameters
messageThe message to write to.
fromMarkerGets the From Marker while writing the MBox Storage file.

Friends And Related Function Documentation

◆ Aspose::Email::Storage::Mbox::MboxrdStorageWriter

friend class Aspose::Email::Storage::Mbox::MboxrdStorageWriter
friend