C# Class anmar.SharpMimeTools.SharpTnefMessage

Decodes ms-tnef streams (those winmail.dat attachments).
Only tnef attributes related to attachments are decoded right now. All the MAPI properties encoded in the stream (rtf body, ...) are ignored.
While decoding, the cheksum of each attribute is verified to ensure the tnef stream is not corupt.
Exibir arquivo Open project: jeske/StepsDB-alpha Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes and releases the reading resources associated with this instance.

Be carefull before calling this method, as it also close the underlying System.IO.Stream.

Parse ( ) : bool

Parses the ms-tnef stream from the provided System.IO.Stream.

The attachments found are saved in memory as System.IO.MemoryStream instances.

Parse ( System path ) : bool

Parses the ms-tnef stream from the provided System.IO.Stream.

SharpTnefMessage ( System input ) : System

Initializes a new instance of the anmar.SharpMimeTools.SharpTnefMessage class based on the supplied System.IO.Stream.

The tnef stream isn't automatically parsed, you must call Parse() or Parse(string).

Private Methods

Method Description
ReadByte ( ) : Byte
ReadBytes ( int length ) : System.Byte[]
ReadBytesTo ( int length, System stream ) : int
ReadInt ( ) : int
ReadMapi ( System data, int size ) : void
ReadUInt16 ( ) : ushort
VerifyChecksum ( System data, ushort checksum ) : bool

Method Details

Close() public method

Closes and releases the reading resources associated with this instance.
Be carefull before calling this method, as it also close the underlying System.IO.Stream.
public Close ( ) : void
return void

Parse() public method

Parses the ms-tnef stream from the provided System.IO.Stream.
The attachments found are saved in memory as System.IO.MemoryStream instances.
public Parse ( ) : bool
return bool

Parse() public method

Parses the ms-tnef stream from the provided System.IO.Stream.
public Parse ( System path ) : bool
path System A specifying the path on which to save the attachments found. Specify the null reference to save them in memory as instances instead.
return bool

SharpTnefMessage() public method

Initializes a new instance of the anmar.SharpMimeTools.SharpTnefMessage class based on the supplied System.IO.Stream.
The tnef stream isn't automatically parsed, you must call Parse() or Parse(string).
public SharpTnefMessage ( System input ) : System
input System that contains the ms-tnef strream.
return System