C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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).

Приватные методы

Метод Описание
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

Описание методов

Close() публичный Метод

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
Результат void

Parse() публичный Метод

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
Результат bool

Parse() публичный Метод

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.
Результат bool

SharpTnefMessage() публичный Метод

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.
Результат System