Class ValueStore.Node
Named value node with optional variants and children.
Inheritance
System.Object
ValueStore.Node
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
|
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
Methods
|
Improve this Doc
View Source
AddChild(String, String)
Declaration
public ValueStore.Node AddChild(string name, string value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
value |
|
Returns
|
Improve this Doc
View Source
AddVariant(String, String)
Declaration
public ValueStore.Node AddVariant(string name, string value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
value |
|
Returns
|
Improve this Doc
View Source
ClearChildren()
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
|
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 Parameters
|
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
|
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
|
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
|
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
|
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)
Declaration
public void RemoveChild(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
|
Improve this Doc
View Source
RemoveVariant(String)
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()