Table of Contents

Class NodeContainerFormat

Namespace
Yarhl.FileSystem
Assembly
Yarhl.dll

Node container format for unpack / pack files.

public class NodeContainerFormat : IDisposable, ICloneableFormat, IFormat
Inheritance
NodeContainerFormat
Implements
Inherited Members
Extension Methods

Constructors

NodeContainerFormat()

Initializes a new instance of the NodeContainerFormat class.

public NodeContainerFormat()

Properties

Disposed

Gets a value indicating whether this NodeContainerFormat is disposed.

public bool Disposed { get; }

Property Value

bool

Root

Gets the root node containing the children.

public Node Root { get; }

Property Value

Node

Methods

DeepClone()

Deep clones a format into a new object.

public virtual object DeepClone()

Returns

object

The cloned format.

Remarks

A 'deep copy' must create the necessary copies, in the way that any change in the original node (or any of it's member hierarchy) won't affect the cloned node.

Dispose()

Releases all resource used by the NodeContainerFormat object.

public void Dispose()

Dispose(bool)

Releases all resource used by the NodeContainerFormat object.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

If set to true free managed resources also. It happens from Dispose() calls.

MoveChildrenTo(Node, bool)

Moves the children from this format to a Node.

public void MoveChildrenTo(Node newNode, bool mergeContainers = false)

Parameters

newNode Node

Node that will contain the children.

mergeContainers bool

If set to true it will merge container nodes with the same name.

Remarks

The node will handle the lifecycle of the children. Disposing the format won't dispose the children. It will replace nodes with the same name.