Table of Contents

CompoundEntryBuilder Class

Definition

Namespace
Bodu.IO.Compound.Builders
Assembly
Bodu.IO.Compound.dll
Package
Bodu.IO.Compound 1.0.0
Source
CompoundEntryBuilder.cs

Represents a node in a mutable compound-file object model - either a storage (a named container) or a stream (a named byte payload).

public abstract class CompoundEntryBuilder
Inheritance
CompoundEntryBuilder
Derived
Inherited Members
Extension Methods

Remarks

This is the authoring counterpart of the read-only navigation surface (CompoundStorage / CompoundStream), shaped after the JsonNode family: build a tree of CompoundStorageBuilder and CompoundStreamBuilder objects, then serialize it to a compound file. A node belongs to at most one parent storage at a time.

Unlike a JSON document, a compound file has no array or null concept - every entry is a named storage or stream - so the model has exactly two concrete node kinds.

Properties

ClassId

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

public Guid ClassId { get; set; }

Property Value

Guid

The entry's class identifier; Empty when none is assigned.

CreationTime

Gets or sets the creation time recorded for the entry.

public DateTimeOffset? CreationTime { get; set; }

Property Value

DateTimeOffset?

The creation time, or null when none is recorded.

EntryType

Gets the kind of entry this node represents.

public abstract CompoundEntryType EntryType { get; }

Property Value

CompoundEntryType

The CompoundEntryType of the node.

ModifiedTime

Gets or sets the last-modified time recorded for the entry.

public DateTimeOffset? ModifiedTime { get; set; }

Property Value

DateTimeOffset?

The last-modified time, or null when none is recorded.

Name

Gets the name of the entry as it appears in its parent storage.

public string Name { get; }

Property Value

string

The entry name; the key under which the parent storage holds this node.

Parent

Gets the parent storage of this node, or null when the node is a detached root.

public CompoundStorageBuilder? Parent { get; }

Property Value

CompoundStorageBuilder

The parent CompoundStorageBuilder, or null.

Root

Gets the topmost ancestor of this node.

public CompoundEntryBuilder Root { get; }

Property Value

CompoundEntryBuilder

The root node reached by following Parent; this node when it has no parent.

StateBits

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

public int StateBits { get; set; }

Property Value

int

The raw state-bit flags.

Methods

AsStorage()

Returns this node as a CompoundStorageBuilder.

public CompoundStorageBuilder AsStorage()

Returns

CompoundStorageBuilder

This node cast to CompoundStorageBuilder.

Exceptions

InvalidOperationException

Thrown when this node is not a storage.

AsStream()

Returns this node as a CompoundStreamBuilder.

public CompoundStreamBuilder AsStream()

Returns

CompoundStreamBuilder

This node cast to CompoundStreamBuilder.

Exceptions

InvalidOperationException

Thrown when this node is not a stream.

DeepClone()

Creates a deep, detached copy of this node and its descendants.

public abstract CompoundEntryBuilder DeepClone()

Returns

CompoundEntryBuilder

An independent copy with no parent.

Applies to

ProductVersions
.NET8, 10