CompoundEntryInfo Class
Definition
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
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;
0for 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
\x05prefix 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
0when 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
otherCompoundEntryInfoAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
leftCompoundEntryInforightCompoundEntryInfo
Returns
operator !=(CompoundEntryInfo?, CompoundEntryInfo?)
public static bool operator !=(CompoundEntryInfo? left, CompoundEntryInfo? right)
Parameters
leftCompoundEntryInforightCompoundEntryInfo
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |