C# Class anmar.SharpMimeTools.SharpAttachment

This class provides the basic functionality for handling attachments
ファイルを表示 Open project: jeske/StepsDB-alpha Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the underling stream if it's open.

Save ( System path, bool overwrite ) : System.IO.FileInfo

Saves of the attachment to a file in the given path.

If the file was already saved, the previous System.IO.FileInfo is returned.
Once the file is successfully saved, the stream is closed and SavedFile property is updated.

SharpAttachment ( System stream ) : System

Initializes a new instance of the anmar.SharpMimeTools.SharpAttachment class based on the supplied System.IO.MemoryStream.

Method Details

Close() public method

Closes the underling stream if it's open.
public Close ( ) : void
return void

Save() public method

Saves of the attachment to a file in the given path.
If the file was already saved, the previous System.IO.FileInfo is returned.
Once the file is successfully saved, the stream is closed and SavedFile property is updated.
public Save ( System path, bool overwrite ) : System.IO.FileInfo
path System A specifying the path on which to save the attachment.
overwrite bool true if the destination file can be overwritten; otherwise, false.
return System.IO.FileInfo

SharpAttachment() public method

Initializes a new instance of the anmar.SharpMimeTools.SharpAttachment class based on the supplied System.IO.MemoryStream.
public SharpAttachment ( System stream ) : System
stream System instance that contains the attachment content.
return System