Class PropertyNode<TContainer, TProperty, TEditor>
- Namespace
- NanoByte.StructureEditor
- Assembly
- NanoByte.StructureEditor.dll
Describes a node in the structure that points to a property.
public class PropertyNode<TContainer, TProperty, TEditor> : Node where TContainer : class where TProperty : class where TEditor : INodeEditor<TProperty>, new()
Type Parameters
TContainer
The type of the container containing the property.
TProperty
The type of the property.
TEditor
An editor for modifying the content of the property.
- Inheritance
-
PropertyNode<TContainer, TProperty, TEditor>
- Inherited Members
Constructors
PropertyNode(string, TContainer, PropertyPointer<TProperty?>)
Describes a node in the structure that points to a property.
public PropertyNode(string name, TContainer container, PropertyPointer<TProperty?> pointer)
Parameters
name
stringThe name of the property.
container
TContainerThe container containing the property.
pointer
PropertyPointer<TProperty>A pointer to the property.
Methods
GetEditorControl(ICommandExecutor)
Gets a GUI control for editing the node's target.
public override 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 override IUndoCommand GetRemoveCommand()
Returns
GetSerialized()
Returns a serialized representation of the Target.
public override string GetSerialized()
Returns
GetUpdateCommand(string)
Gets a command for updating the node's target with a new value.
public override IValueCommand? GetUpdateCommand(string serializedValue)
Parameters
serializedValue
stringA serialized representation of the new value.