PstWriterFolder Class
A folder of a file a PstWriter writes. The items added to it are written immediately; the folder itself is written by PstWriter.Complete.
public sealed class PstWriterFolderProperties
| Name | Description |
|---|---|
| ContainerClass | Gets or sets the class of the items of the folder, such as IPF.Note, IPF.Contact, IPF.Appointment or IPF.Task. |
| DisplayName | Gets or sets the display name of the folder. |
| Folders | Gets the subfolders. |
| ItemCount | Gets the number of items added to the folder. |
| Parent | Gets the parent folder, or null for the root folder of the file. |
| Properties | Gets the properties of the folder. The display name, the container class and the counts are set by the writer. |
ContainerClass
PstWriterFolder.csDisplayName
PstWriterFolder.csFolders
PstWriterFolder.csItemCount
PstWriterFolder.csParent
PstWriterFolder.csGets the parent folder, or null for the root folder of the file.
public PstWriterFolder? Parent { get; }Property value
Properties
PstWriterFolder.csGets the properties of the folder. The display name, the container class and the counts are set by the writer.
public MapiPropertyBag Properties { get; }Property value
Methods
| Name | Description |
|---|---|
| AddItem(MapiMessageBuilder) | Writes an item to the folder. The builder can be reused or modified after the call: the item is already written. A content set from a stream that cannot seek is read once: set it again before writing the builder again. |
| CreateFolder(string, string?) | Creates a subfolder. |
| ToString() | Returns the display name of the folder. |
AddItem(MapiMessageBuilder)
PstWriterFolder.csWrites an item to the folder. The builder can be reused or modified after the call: the item is already written. A content set from a stream that cannot seek is read once: set it again before writing the builder again.
public void AddItem(MapiMessageBuilder item)Parameters
itemMapiMessageBuilder- The item.
Exceptions
InvalidOperationException- The writer is completed, or the folder is a search folder.
ArgumentException- A property has a value that its type cannot store.
CreateFolder(string, string?)
PstWriterFolder.csCreates a subfolder.
public PstWriterFolder CreateFolder(string displayName, string? containerClass = null)Parameters
displayNamestring- The display name of the folder.
containerClassstring?- The class of the items of the folder, such as
IPF.Note, ornull.
Returns
PstWriterFolder The new folder.
Exceptions
InvalidOperationException- The writer is completed, or the folder is a search folder.