Class ItemSelectorLayoutGenerator
A layout generator that always returns the default grid selection layout for the user choosing an entity of the specified type
This will choose any ItemSelectorDefaultLayoutAttribute marked layout first with priority over any standard DefaultLayoutGenerator implementation
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.DefaultLayouts
Assembly: ClientCore.dll
Syntax
public class ItemSelectorLayoutGenerator : ILayoutGenerator
Constructors
ItemSelectorLayoutGenerator(EntityDescriptor)
Creates a new ItemSelectorLayoutGenerator for the specified entity type
Declaration
public ItemSelectorLayoutGenerator(EntityDescriptor descriptor)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | descriptor | The type of entity to create a default layout generator for selecting from a grid for |
Methods
AddLayoutSelectorOverride(EntityDescriptor, ILayoutGenerator)
Adds the specified layout generator as the layout to be used for the specified type whenever a selection grid layout is required
Declaration
public static void AddLayoutSelectorOverride(EntityDescriptor forEntityType, ILayoutGenerator layout)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | forEntityType | The type of entity to provide a different layout generator for other than the standard DefaultLayoutGenerator implementation when requiring a layout for choosing items from a selection |
ILayoutGenerator | layout | The layout generator to use for the user selecting entites of the specified type |
GenerateLayout(String, String)
Returns either a ItemSelectorDefaultLayoutAttribute marked layout or the default DefaultLayoutGenerator implementation for a layout of a collection of the specified entity type
Declaration
public Task<LayoutDescriptor> GenerateLayout(string uniqueLayoutName, string layoutParam)
Parameters
Type | Name | Description |
---|---|---|
System.String | uniqueLayoutName | The unique name of the layout this is being generated for |
System.String | layoutParam | ANy optional parameters for the layout that are could be used to generate this layout |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<LayoutDescriptor> | A LayoutDescriptor that details how to construct the layout in the UI of the client application |