Table of Contents

Class PropertyElementNode<TContainer, TProperty, TElement, TEditor>

Namespace
NanoByte.StructureEditor
Assembly
NanoByte.StructureEditor.dll

Describes a node in the structure that points to a specific type of value of a polymorphic single-value property.

public class PropertyElementNode<TContainer, TProperty, TElement, TEditor> : Node where TContainer : class where TProperty : class where TElement : class, TProperty where TEditor : INodeEditor<TElement>, new()

Type Parameters

TContainer

The type of the container containing the property.

TProperty

The base type of the property.

TElement

The specific type the property value currently has.

TEditor

An editor for modifying the content of the value.

Inheritance
object
PropertyElementNode<TContainer, TProperty, TElement, TEditor>
Inherited Members

Constructors

PropertyElementNode(string, TContainer, PropertyPointer<TProperty?>, TElement, bool)

Describes a node in the structure that points to a specific type of value of a polymorphic single-value property.

public PropertyElementNode(string name, TContainer container, PropertyPointer<TProperty?> pointer, TElement element, bool nullable = true)

Parameters

name string

The name of the value type.

container TContainer

The container containing the property.

pointer PropertyPointer<TProperty>

A pointer to the property.

element TElement

The current value of the property.

nullable bool

Whether the property may be set to null, i.e. removed.

Methods

GetEditorControl(ICommandExecutor)

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

public override 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; null if the node cannot be removed.

public override IUndoCommand? GetRemoveCommand()

Returns

IUndoCommand

GetSerialized()

Returns a serialized representation of the Target.

public override string GetSerialized()

Returns

string

GetUpdateCommand(string)

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

public override IValueCommand? GetUpdateCommand(string serializedValue)

Parameters

serializedValue string

A serialized representation of the new value.

Returns

IValueCommand