DocumentSummaryInformationBuilder Class
Definition
Authors a document-summary-information property set, producing an OlePropertySet that can be embedded
as the \x05DocumentSummaryInformation stream of a compound file, including an optional user-defined section
of custom named properties.
public sealed class DocumentSummaryInformationBuilder
- Inheritance
-
DocumentSummaryInformationBuilder
- Inherited Members
- Extension Methods
Remarks
Each property is optional; only the properties that are set are written. The result reads back through DocumentSummaryInformation.
Constructors
DocumentSummaryInformationBuilder()
public DocumentSummaryInformationBuilder()
Properties
Category
Gets or sets the document category.
public string? Category { get; set; }
Property Value
CodePage
Gets or sets the code page used to encode string properties.
public int CodePage { get; set; }
Property Value
- int
The code page;
1252by default.
Company
Gets or sets the document company.
public string? Company { get; set; }
Property Value
LineCount
Gets or sets the line count.
public int? LineCount { get; set; }
Property Value
Manager
Gets or sets the document manager.
public string? Manager { get; set; }
Property Value
ParagraphCount
Gets or sets the paragraph count.
public int? ParagraphCount { get; set; }
Property Value
SlideCount
Gets or sets the slide count.
public int? SlideCount { get; set; }
Property Value
Methods
AddCustomProperty(string, OlePropertyValue)
Adds a user-defined custom property.
public void AddCustomProperty(string name, OlePropertyValue value)
Parameters
namestringThe custom property name.
valueOlePropertyValueThe custom property value.
Exceptions
- ArgumentNullException
Thrown when
nameorvalueis null.
ToArray()
Builds the property set and serializes it to its byte form.
public byte[] ToArray()
Returns
- byte[]
The serialized document-summary-information bytes.
ToPropertySet()
Builds the property set from the assigned properties.
public OlePropertySet ToPropertySet()
Returns
- OlePropertySet
An OlePropertySet ready to serialize.
WriteTo(Stream)
Builds the property set and writes its serialized byte form to the supplied stream.
public void WriteTo(Stream stream)
Parameters
streamStreamThe stream to write the document-summary-information bytes to.
Exceptions
- ArgumentNullException
Thrown when
streamis null.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |