Show / Hide Table of Contents

Interface IListDescription<TContainer, TList>

Exposes methods for configuring a list in a ContainerDescription<TContainer> in a Fluent API style.

Namespace: NanoByte.StructureEditor
Assembly: NanoByte.StructureEditor.dll
Syntax
public interface IListDescription<TContainer, TList>
    where TContainer : class where TList : class
Type Parameters
Name Description
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.

Declaration
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
Type Name Description
String name

The name of the element type.

Func<TElement> factory

Callback to create a new instance of TElement.

TEditor editor

Dummy element used for type inference of TEditor.

Returns
Type Description
IListDescription<TContainer, TList>

The "this" pointer for use in a "Fluent API" style.

Type Parameters
Name Description
TElement

The type of a specific element type in the list.

TEditor

An editor for modifying this type of element.

Extension Methods

ContainerDescriptionExtensions.AddElement<TContainer, TList, TElement>(IListDescription<TContainer, TList>, String, Func<TElement>)
In This Article
Back to top Copyright Bastian Eicher