Table of Contents

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 string

The name of the node type.

description string

A description of the node type.

target object

The object the node represents.

Properties

Description

A description of the node type.

public string? Description { get; }

Property Value

string

NodeType

The name of the node type.

public string NodeType { get; }

Property Value

string

Target

The object the node represents.

public object? Target { get; }

Property Value

object

Methods

GetDescription<T>()

Gets the Description of T, if any.

public static string? GetDescription<T>()

Returns

string

Type Parameters

T

GetEditorControl(ICommandExecutor)

Gets a GUI control for editing the node's target.

public abstract INodeEditor GetEditorControl(ICommandExecutor executor)

Parameters

executor ICommandExecutor

Used to perform undo/redo operations.

Returns

INodeEditor

GetRemoveCommand()

Gets a command for removing the node's target from the structure.

public abstract IUndoCommand GetRemoveCommand()

Returns

IUndoCommand

GetSerialized()

Returns a serialized representation of the Target.

public abstract string GetSerialized()

Returns

string

GetUpdateCommand(string)

Gets a command for updating the node's target with a new value.

public abstract IValueCommand? GetUpdateCommand(string serializedValue)

Parameters

serializedValue string

A serialized representation of the new value.

Returns

IValueCommand

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.