Interface IListDescription<TContainer, TList>
- Namespace
- NanoByte.StructureEditor
- Assembly
- NanoByte.StructureEditor.dll
Exposes methods for configuring a list in a ContainerDescription<TContainer> in a Fluent API style.
public interface IListDescription<TContainer, TList> where TContainer : class where TList : class
Type Parameters
TContainer
The type of the container containing the list.
TList
The type of elements in the list.
Methods
AddElement<TElement, TEditor>(string, Func<TElement>, TEditor)
Adds a list element type to the description.
IListDescription<TContainer, TList> AddElement<TElement, TEditor>(string name, Func<TElement> factory, TEditor editor) where TElement : class, TList, IEquatable<TElement> where TEditor : INodeEditor<TElement>, new()
Parameters
name
stringThe name of the element type.
factory
Func<TElement>Callback to create a new instance of
TElement
.editor
TEditorDummy element used for type inference of
TEditor
.
Returns
- IListDescription<TContainer, TList>
The "this" pointer for use in a "Fluent API" style.
Type Parameters
TElement
The type of a specific element type in the list.
TEditor
An editor for modifying this type of element.