Show / Hide Table of Contents

Class ValueStore.Node

Named value node with optional variants and children.

Inheritance
System.Object
ValueStore.Node
ValueStore.RootNode
Namespace: sttz.Trimmer
Assembly: Trimmer.dll
Syntax
[Serializable]
public class Node

Properties

| Improve this Doc View Source

ChildCount

Number of children in this node.

Declaration
public int ChildCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Children

Enumerate the node's children.

Declaration
public IEnumerable<ValueStore.Node> Children { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ValueStore.Node>
| Improve this Doc View Source

Name

Name of the node, variant parameter for variant nodes and child name for child nodes.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Value

The value (if any) of the node.

Declaration
public string Value { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

VariantCount

Number of variants in this node.

Declaration
public int VariantCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Variants

Enumerate the node's variants.

Declaration
public IEnumerable<ValueStore.Node> Variants { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ValueStore.Node>

Methods

| Improve this Doc View Source

AddChild(String, String)

Add a new child node.

Declaration
public ValueStore.Node AddChild(string name, string value)
Parameters
Type Name Description
System.String name
System.String value
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

AddVariant(String, String)

Add a new variant node.

Declaration
public ValueStore.Node AddVariant(string name, string value)
Parameters
Type Name Description
System.String name
System.String value
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

ClearChildren()

Remove all child nodes.

Declaration
public void ClearChildren()
| Improve this Doc View Source

ClearVariants()

Remove all variant nodes.

Declaration
public void ClearVariants()
| Improve this Doc View Source

Clone()

Create a clone of this node, with all its variants and children.

Declaration
public virtual ValueStore.Node Clone()
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

Clone<T>()

Clone method to be used by subclasses for overriding.

Declaration
protected T Clone<T>()
    where T : ValueStore.Node, new()
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

GetChild(String)

Look up a child node by name.

Declaration
public ValueStore.Node GetChild(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

GetOrCreateChild(String)

Look up a child node by name, create it if it doesn't exist.

Declaration
public ValueStore.Node GetOrCreateChild(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

GetOrCreateVariant(String)

Look up a variant node by name, create it if it doesn't exist.

Declaration
public ValueStore.Node GetOrCreateVariant(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

GetVariant(String)

Look up a variant node by name.

Declaration
public ValueStore.Node GetVariant(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
ValueStore.Node
| Improve this Doc View Source

NumberVariantsSequentially()

Set variants parameters to a sequential index, assigned based on natural sort order of existing parameters.

Declaration
public void NumberVariantsSequentially()
| Improve this Doc View Source

RemoveChild(String)

Remove a child node.

Declaration
public void RemoveChild(string name)
Parameters
Type Name Description
System.String name
| Improve this Doc View Source

RemoveVariant(String)

Remove a variant node.

Declaration
public void RemoveVariant(string name)
Parameters
Type Name Description
System.String name
| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
  • Improve this Doc
  • View Source
Back to top © 2017 Adrian Stutz