Table of Contents

DelimitedArray Class

Definition

Namespace
Bodu.Text.Delimited.Nodes
Assembly
Bodu.Text.Delimited.dll
Package
Bodu.Text.Delimited 1.0.0
Source
DelimitedArray.cs

Represents an array node in a mutable delimited document tree: the document of records, or a positional (headerless) record of string fields.

public sealed class DelimitedArray : DelimitedNode, IReadOnlyList<DelimitedNode>, IReadOnlyCollection<DelimitedNode>, IEnumerable<DelimitedNode>, IEnumerable
Inheritance
DelimitedArray
Implements
Inherited Members
Extension Methods

Constructors

DelimitedArray()

Initializes a new instance of the DelimitedArray class.

public DelimitedArray()

Properties

Count

Gets the number of elements in the collection.

public int Count { get; }

Property Value

int

The number of elements in the collection.

this[int]

Gets or sets the child node at the specified index.

public DelimitedNode this[int index] { get; set; }

Parameters

index int

The zero-based index.

Property Value

DelimitedNode

The child node.

Exceptions

ArgumentNullException

Thrown when the assigned value is null.

ArgumentOutOfRangeException

Thrown when index is out of range.

ValueKind

Gets the value kind of this node.

public override DelimitedValueKind ValueKind { get; }

Property Value

DelimitedValueKind

The node's DelimitedValueKind.

Methods

Add(DelimitedNode)

Appends a child node.

public void Add(DelimitedNode node)

Parameters

node DelimitedNode

The node to append.

Exceptions

ArgumentNullException

Thrown when node is null.

Add(string)

Appends a string field.

public void Add(string value)

Parameters

value string

The string value to append.

Exceptions

ArgumentNullException

Thrown when value is null.

Clear()

Removes all child nodes.

public void Clear()

DeepClone()

Creates a deep copy of this node.

public override DelimitedNode DeepClone()

Returns

DelimitedNode

The cloned node.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<DelimitedNode> GetEnumerator()

Returns

IEnumerator<DelimitedNode>

An enumerator that can be used to iterate through the collection.

RemoveAt(int)

Removes the child node at the specified index.

public void RemoveAt(int index)

Parameters

index int

The zero-based index.

Exceptions

ArgumentOutOfRangeException

Thrown when index is out of range.

WriteTo(ref Utf8DelimitedWriter)

Writes this node's delimited representation to the supplied writer.

public override void WriteTo(ref Utf8DelimitedWriter writer)

Parameters

writer Utf8DelimitedWriter

The writer that receives the delimited bytes.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IEnumerator IEnumerable.GetEnumerator()

Returns

IEnumerator

An IEnumerator object that can be used to iterate through the collection.

Applies to

ProductVersions
.NET8, 10