Table of Contents

DocumentSummaryInformationBuilder Class

Definition

Namespace
Bodu.IO.Compound.PropertySets
Assembly
Bodu.IO.Compound.dll
Package
Bodu.IO.Compound 1.0.0
Source
DocumentSummaryInformationBuilder.cs

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

string

The category, or null when unset.

CodePage

Gets or sets the code page used to encode string properties.

public int CodePage { get; set; }

Property Value

int

The code page; 1252 by default.

Company

Gets or sets the document company.

public string? Company { get; set; }

Property Value

string

The company, or null when unset.

LineCount

Gets or sets the line count.

public int? LineCount { get; set; }

Property Value

int?

The line count, or null when unset.

Manager

Gets or sets the document manager.

public string? Manager { get; set; }

Property Value

string

The manager, or null when unset.

ParagraphCount

Gets or sets the paragraph count.

public int? ParagraphCount { get; set; }

Property Value

int?

The paragraph count, or null when unset.

SlideCount

Gets or sets the slide count.

public int? SlideCount { get; set; }

Property Value

int?

The slide count, or null when unset.

Methods

AddCustomProperty(string, OlePropertyValue)

Adds a user-defined custom property.

public void AddCustomProperty(string name, OlePropertyValue value)

Parameters

name string

The custom property name.

value OlePropertyValue

The custom property value.

Exceptions

ArgumentNullException

Thrown when name or value is 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

stream Stream

The stream to write the document-summary-information bytes to.

Exceptions

ArgumentNullException

Thrown when stream is null.

Applies to

ProductVersions
.NET8, 10