Version 3.3.1.2

BaseDataReaderWriter class

Namespace: Sirenix.Serialization
Assembly: Sirenix.Serialization
public abstract class BaseDataReaderWriter
Implements functionality that is shared by both data readers and data writers.
Inheritance
  • System.Object
  • BaseDataReaderWriter

Constructors

BaseDataReaderWriter()
protected BaseDataReaderWriter()

Properties

CurrentNode
Gets the current node, or Empty if there is no current node.
protected NodeInfo CurrentNode { get; }
IsInArrayNode
Gets a value indicating whether the reader or writer is in an array node.
public bool IsInArrayNode { get; }
NodeDepth
Gets the current node depth. In other words, the current count of the node stack.
protected int NodeDepth { get; }
NodesArray
Gets the current nodes array. The amount of nodes contained in it is stored in the NodeDepth property. The remainder of the array's length is buffer space.
protected NodeInfo[] NodesArray { get; }

Methods

ClearNodes()
protected void ClearNodes()
PopArray()
Pops the current node if the current node is an array node.
protected void PopArray()
PopNode(String)
Pops the current node off of the node stack.
protected void PopNode(string name)
Parameters
System.String name

The name of the node to pop.

Exceptions
System.InvalidOperationException

There are no nodes to pop. or Tried to pop node with given name, but the current node's name was different.

PushArray()
Pushes an array node onto the node stack. This uses values from the current node to provide extra info about the array node.
protected void PushArray()
PushNode(NodeInfo)
Pushes a node onto the node stack.
protected void PushNode(NodeInfo node)
Parameters
NodeInfo node

The node to push.

PushNode(String, Int32, Type)
Pushes a node with the given name, id and type onto the node stack.
protected void PushNode(string name, int id, Type type)
Parameters
System.String name

The name of the node.

System.Int32 id

The id of the node.

System.Type type

The type of the node.

Derived Classes