Class Node
- Namespace
- NanoByte.StructureEditor
- Assembly
- NanoByte.StructureEditor.dll
Describes a specific node in the structure.
public abstract class Node
- Inheritance
-
Node
- Derived
- Inherited Members
Constructors
Node(string, string?, object?)
Describes a specific node in the structure.
protected Node(string nodeType, string? description, object? target)
Parameters
nodeType
stringThe name of the node type.
description
stringA description of the node type.
target
objectThe object the node represents.
Properties
Description
A description of the node type.
public string? Description { get; }
Property Value
NodeType
The name of the node type.
public string NodeType { get; }
Property Value
Target
The object the node represents.
public object? Target { get; }
Property Value
Methods
GetDescription<T>()
Gets the Description of T
, if any.
public static string? GetDescription<T>()
Returns
Type Parameters
T
GetEditorControl(ICommandExecutor)
Gets a GUI control for editing the node's target.
public abstract INodeEditor GetEditorControl(ICommandExecutor executor)
Parameters
executor
ICommandExecutorUsed to perform undo/redo operations.
Returns
GetRemoveCommand()
Gets a command for removing the node's target from the structure.
public abstract IUndoCommand GetRemoveCommand()
Returns
GetSerialized()
Returns a serialized representation of the Target.
public abstract string GetSerialized()
Returns
GetUpdateCommand(string)
Gets a command for updating the node's target with a new value.
public abstract IValueCommand? GetUpdateCommand(string serializedValue)
Parameters
serializedValue
stringA serialized representation of the new value.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.