次の方法で共有


TNEF Architecture

Topic Last Modified: 2007-11-02

The Microsoft.Exchange.Data.ContentTypes.Tnef namespace contains classes and types that enable forward-only stream-based reading and writing of Transport-Neutral Encoding Format (TNEF) data. TNEF is a data format that is used to encapsulate MAPI properties for clients that cannot interpret MAPI.

TnefReader and TnefWriter

The TnefReader and TnefWriter classes provide the core functionality in the Microsoft.Exchange.Data.ContentTypes.Tnef namespace.

The TnefReader class takes a readable stream as an argument to its constructors. You then use the ReadNextAttribute method to sequentially read the attributes in the TNEF stream. After you have read an attribute, you can access information about the attribute by using any of the read-only properties on the TnefReader object, in addition to getting a TnefPropertyReader to read the current property. You can also directly access the current attribute by using the ReadAttributeRawValue method.

The TnefWriter class takes a writable Stream as an argument to its constructors. The TnefWriter class provides multiple ways in which to write data to this stream.