C# Class anmar.SharpMimeTools.SharpAttachment

This class provides the basic functionality for handling attachments
Afficher le fichier Open project: jeske/StepsDB-alpha Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

Save() public méthode

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.
Résultat System.IO.FileInfo

SharpAttachment() public méthode

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.
Résultat System