SummaryInformation Class
Definition
- Namespace
- Bodu.IO.Compound.PropertySets
- Assembly
- Bodu.IO.Compound.dll
- Package
- Bodu.IO.Compound 1.0.0
- Source
- SummaryInformation.cs
Provides a strongly-typed view over the standard summary-information property set (\x05SummaryInformation) of
a compound file.
public sealed class SummaryInformation
- Inheritance
-
SummaryInformation
- Inherited Members
- Extension Methods
Remarks
The summary-information set carries document metadata such as the title, author, and revision times. Each property is optional; a property that is absent or of an unexpected type is surfaced as null.
using Bodu.IO.Compound;
using Bodu.IO.Compound.PropertySets;
using CompoundFile file = CompoundFile.OpenRead("book.xls");
if (file.TryGetSummaryInformation(out SummaryInformation? summary))
{
Console.WriteLine($"Title: {summary.Title}");
Console.WriteLine($"Author: {summary.Author}");
Console.WriteLine($"Created: {summary.CreateTime:u}");
}
Constructors
SummaryInformation(OlePropertySet)
Initializes a new instance of the SummaryInformation class over a parsed property set.
public SummaryInformation(OlePropertySet propertySet)
Parameters
propertySetOlePropertySetThe parsed summary-information property set.
Exceptions
- ArgumentNullException
Thrown when
propertySetis null.
Fields
StreamName
The directory name of the summary-information stream, including its control prefix.
public const string StreamName = "\u0005SummaryInformation"
Field Value
Properties
ApplicationName
Gets the name of the application that created the document.
public string? ApplicationName { get; }
Property Value
Author
Gets the document author.
public string? Author { get; }
Property Value
CharacterCount
Gets the character count.
public int? CharacterCount { get; }
Property Value
Comments
Gets the document comments.
public string? Comments { get; }
Property Value
CreateTime
Gets the time the document was created.
public DateTimeOffset? CreateTime { get; }
Property Value
- DateTimeOffset?
The creation time, or null when absent.
Keywords
Gets the document keywords.
public string? Keywords { get; }
Property Value
LastAuthor
Gets the name of the user who last saved the document.
public string? LastAuthor { get; }
Property Value
LastPrinted
Gets the time the document was last printed.
public DateTimeOffset? LastPrinted { get; }
Property Value
- DateTimeOffset?
The last-printed time, or null when absent.
LastSaveTime
Gets the time the document was last saved.
public DateTimeOffset? LastSaveTime { get; }
Property Value
- DateTimeOffset?
The last-saved time, or null when absent.
PageCount
Gets the page count.
public int? PageCount { get; }
Property Value
PropertySet
Gets the underlying parsed property set.
public OlePropertySet PropertySet { get; }
Property Value
- OlePropertySet
The summary-information OlePropertySet.
RevisionNumber
Gets the document revision number.
public string? RevisionNumber { get; }
Property Value
Security
Gets the document security flags.
public int? Security { get; }
Property Value
Subject
Gets the document subject.
public string? Subject { get; }
Property Value
Template
Gets the document template name.
public string? Template { get; }
Property Value
Title
Gets the document title.
public string? Title { get; }
Property Value
TotalEditTime
Gets the total editing time.
public TimeSpan? TotalEditTime { get; }
Property Value
WordCount
Gets the word count.
public int? WordCount { get; }
Property Value
Methods
Read(Stream)
Reads and parses a summary-information property set from a stream, consuming it to the end.
public static SummaryInformation Read(Stream stream)
Parameters
streamStreamThe stream containing the summary-information property-set bytes.
Returns
- SummaryInformation
A SummaryInformation view over the parsed property set.
Exceptions
- ArgumentNullException
Thrown when
streamis null.- CompoundFileFormatException
Thrown when the data is not a well-formed property set.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |