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
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.DefaultLayouts
Assembly: LemonEdge.ClientCore.dll
Syntax
public class ItemSelectorLayoutGenerator : ILayoutGenerator
Constructors
ItemSelectorLayoutGenerator(EntityDescriptor, Dictionary<EntityDescriptor, ILayoutGenerator>, IRootController)
Creates a new ItemSelectorLayoutGenerator for the specified entity type
Declaration
public ItemSelectorLayoutGenerator(EntityDescriptor descriptor, Dictionary<EntityDescriptor, ILayoutGenerator> cache, IRootController rootController)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | descriptor | The type of entity to create a default layout generator for selecting from a grid for |
Dictionary<EntityDescriptor, ILayoutGenerator> | cache | A cache for pre-existing items |
IRootController | rootController | The root controller, for service access |
Methods
CanGenerateLayout(string, string)
Returns true if this default layout generator works for the specified uniqueLayoutName
and
layoutParam
combination
Declaration
public bool CanGenerateLayout(string uniqueLayoutName, string layoutParam)
Parameters
Type | Name | Description |
---|---|---|
string | uniqueLayoutName | The unique name of the layout to generate |
string | layoutParam | Any optional parameters for the layout to use while generating it |
Returns
Type | Description |
---|---|
bool | True if this default layout generator works for the specified |
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 |
---|---|---|
string | uniqueLayoutName | The unique name of the layout this is being generated for |
string | layoutParam | ANy optional parameters for the layout that are could be used to generate this layout |
Returns
Type | Description |
---|---|
Task<LayoutDescriptor> | A LayoutDescriptor that details how to construct the layout in the UI of the client application |