DelimitedArray Class
Definition
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
indexintThe zero-based index.
Property Value
- DelimitedNode
The child node.
Exceptions
- ArgumentNullException
Thrown when the assigned value is null.
- ArgumentOutOfRangeException
Thrown when
indexis 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
nodeDelimitedNodeThe node to append.
Exceptions
- ArgumentNullException
Thrown when
nodeis null.
Add(string)
Appends a string field.
public void Add(string value)
Parameters
valuestringThe string value to append.
Exceptions
- ArgumentNullException
Thrown when
valueis 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
indexintThe zero-based index.
Exceptions
- ArgumentOutOfRangeException
Thrown when
indexis out of range.
WriteTo(ref Utf8DelimitedWriter)
Writes this node's delimited representation to the supplied writer.
public override void WriteTo(ref Utf8DelimitedWriter writer)
Parameters
writerUtf8DelimitedWriterThe 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
| Product | Versions |
|---|---|
| .NET | 8, 10 |