Table of Contents

CompoundEntryInfo Class

Definition

Namespace
Bodu.IO.Compound
Assembly
Bodu.IO.Compound.dll
Package
Bodu.IO.Compound 1.0.0
Source
CompoundEntryInfo.cs

Provides an immutable snapshot of the metadata recorded for a single compound-file directory entry - a storage, a stream, or the root storage.

public sealed record CompoundEntryInfo : IEquatable<CompoundEntryInfo>
Inheritance
CompoundEntryInfo
Implements
Inherited Members
Extension Methods

Remarks

This record is the managed counterpart of the COM STATSTG structure: it carries the name, kind, payload size, class identifier, state bits, and time stamps that the directory stores for each entry, without exposing the underlying sector layout.

The CreationTime and LastModifiedTime values are meaningful for storage and root-storage entries; stream entries conventionally record zero, which is surfaced as null.

Constructors

CompoundEntryInfo()

public CompoundEntryInfo()

Properties

ClassId

Gets the class identifier (CLSID) associated with the entry.

public Guid ClassId { get; init; }

Property Value

Guid

For storage and root-storage entries this is the object class that created the storage; stream entries typically record Empty.

Color

Gets the red-black tree node color recorded for the entry.

public CompoundEntryColor Color { get; init; }

Property Value

CompoundEntryColor

The CompoundEntryColor of the entry's directory node.

CreationTime

Gets the creation time recorded for the entry.

public DateTimeOffset? CreationTime { get; init; }

Property Value

DateTimeOffset?

The creation time, or null when the directory records no time stamp.

EntryType

Gets the kind of object this entry describes.

public CompoundEntryType EntryType { get; init; }

Property Value

CompoundEntryType

The CompoundEntryType of the entry.

LastModifiedTime

Gets the last-modified time recorded for the entry.

public DateTimeOffset? LastModifiedTime { get; init; }

Property Value

DateTimeOffset?

The last-modified time, or null when the directory records no time stamp.

Length

Gets the payload size, in bytes.

public long Length { get; init; }

Property Value

long

The number of payload bytes for a stream entry; 0 for storage and root-storage entries.

Name

Gets the entry name as stored in the directory.

public string Name { get; init; }

Property Value

string

The directory name. Control prefixes used by some Office streams (for example, the \x05 prefix on summary-information streams) are preserved verbatim.

StateBits

Gets the user-defined state bits recorded for the entry.

public int StateBits { get; init; }

Property Value

int

The raw state-bit flags, or 0 when none are recorded.

Methods

Equals(CompoundEntryInfo?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CompoundEntryInfo? other)

Parameters

other CompoundEntryInfo

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(CompoundEntryInfo?, CompoundEntryInfo?)

public static bool operator ==(CompoundEntryInfo? left, CompoundEntryInfo? right)

Parameters

left CompoundEntryInfo
right CompoundEntryInfo

Returns

bool

operator !=(CompoundEntryInfo?, CompoundEntryInfo?)

public static bool operator !=(CompoundEntryInfo? left, CompoundEntryInfo? right)

Parameters

left CompoundEntryInfo
right CompoundEntryInfo

Returns

bool

Applies to

ProductVersions
.NET8, 10