Interface IPropertyDescription<TContainer, TProperty>
- Namespace
- NanoByte.StructureEditor
- Assembly
- NanoByte.StructureEditor.dll
Exposes methods for configuring a polymorphic single-value property in a ContainerDescription<TContainer> in a Fluent API style.
public interface IPropertyDescription<TContainer, TProperty> where TContainer : class where TProperty : class
Type Parameters
TContainerThe type of the container containing the property.
TPropertyThe base type of the property.
Methods
AddElement<TElement, TEditor>(string, Func<TElement>, TEditor)
Adds a property value type to the description.
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "Generics used as type-safe reflection replacement.")]
IPropertyDescription<TContainer, TProperty> AddElement<TElement, TEditor>(string name, Func<TElement> factory, TEditor editor) where TElement : class, TProperty, IEquatable<TElement> where TEditor : INodeEditor<TElement>, new()
Parameters
namestringThe name of the value type.
factoryFunc<TElement>Callback to create a new instance of
TElement.editorTEditorDummy element used for type inference of
TEditor.
Returns
- IPropertyDescription<TContainer, TProperty>
The "this" pointer for use in a "Fluent API" style.
Type Parameters
TElementA specific type the property value can have.
TEditorAn editor for modifying this type of value.