SnapshotNodeChildren Struct
Definition
Lightweight view over a children array with an explicit count. Avoids copying when builder arrays are over-allocated.
public struct SnapshotNodeChildren
Constructors
| Name | Description |
|---|---|
| SnapshotNodeChildren | Initializes a view over items, of which the first count entries are children. |
SnapshotNodeChildren Constructor
Initializes a view over items, of which the first
count entries are children.
public SnapshotNodeChildren(Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode[] items, int count)
Parameters
items Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode[]
The backing array. Stored by reference, not copied.
count int
How many leading entries are in use.
Remarks
The array is stored by reference, so a later write to it changes an object the rest of the surface presents as immutable. Building a snapshot tree goes through Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder, which owns its arrays; Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren.Empty is the only instance a caller outside the assembly needs to name.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetEnumerator | Returns a Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren.Enumerator over this collection. |
| GetHashCode | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren other)
Parameters
other Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetEnumerator Method
Returns a Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren.Enumerator over this collection.
public Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren.Enumerator GetEnumerator()
Returns
Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren.Enumerator
GetHashCode Method
public int GetHashCode()
Returns
int
Properties
| Name | Description |
|---|---|
| Count | No summary available. |
| Empty | Gets an empty Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren instance. |
| Item | No summary available. |
Count Property
public int Count { get; set; }
Empty Property
Gets an empty Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren instance.
public Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNodeChildren Empty { get; set; }
Item Property
public Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode Item { get; set; }