Class LayoutGeneratorFactory
Inherited Members
Namespace: LemonEdge.Client.Core.Views.DefaultLayouts.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
public class LayoutGeneratorFactory : ILayoutGeneratorFactory, IHaveAddInListeners
Constructors
LayoutGeneratorFactory(IFactoryInjector, IReflectionHelper, IEntityDescriptorFactory, IViewDescriptorEnumeratorFactory, IDomainContextEventHandler, ILogger<LayoutGeneratorFactory>)
Declaration
public LayoutGeneratorFactory(IFactoryInjector factoryInjector, IReflectionHelper reflectionHelper, IEntityDescriptorFactory entityDescriptorFactory, IViewDescriptorEnumeratorFactory enumeratorFactory, IDomainContextEventHandler eventHandler, ILogger<LayoutGeneratorFactory> logger)
Parameters
Type | Name | Description |
---|---|---|
IFactoryInjector | factoryInjector | |
IReflectionHelper | reflectionHelper | |
IEntityDescriptorFactory | entityDescriptorFactory | |
IViewDescriptorEnumeratorFactory | enumeratorFactory | |
IDomainContextEventHandler | eventHandler | |
ILogger<LayoutGeneratorFactory> | logger |
Methods
AddAddInListeners()
Adds listeners.
Declaration
public void AddAddInListeners()
CanGenerateDefaultLayout(string, string)
Determines whether a default layout generator can be generated for the given arguments
Declaration
public bool CanGenerateDefaultLayout(string uniqueLayoutName, string layoutParam)
Parameters
Type | Name | Description |
---|---|---|
string | uniqueLayoutName | The unique layout name |
string | layoutParam | The layout parameters |
Returns
Type | Description |
---|---|
bool | Whether the layout can be created |
CanGenerateDefaultOrCustomLayout(string, string)
Returns true if there is a default layout generator, or ILayout, that works for the
specified uniqueLayoutName
and layoutParam
combination
Declaration
public Task<bool> CanGenerateDefaultOrCustomLayout(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 |
---|---|
Task<bool> | True if there is a default layout generator, or ILayout, that works for the
specified |
GetDefaultLayoutGenerator(string, string)
Returns the default layout generator for the specified uniqueLayoutName
and
layoutParam
combination
Declaration
public DefaultLayoutGenerator? GetDefaultLayoutGenerator(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 |
---|---|
DefaultLayoutGenerator | The default layout generator for the specified |
GetDefaultLayoutGenerators()
Returns all the default layout generators in the system and any loaded custom IAddIn
Declaration
public DefaultLayoutGenerator[] GetDefaultLayoutGenerators()
Returns
Type | Description |
---|---|
DefaultLayoutGenerator[] | All the default layout generators in the system and any loaded custom IAddIn |
GetDefaultLayoutGenerators(string, string)
Returns all the default layout generators in the system and any loaded custom IAddIn, for the given uniqueLayoutName and layoutParam
Declaration
public DefaultLayoutGenerator[] GetDefaultLayoutGenerators(string uniqueLayoutName, string layoutParam)
Parameters
Type | Name | Description |
---|---|---|
string | uniqueLayoutName | |
string | layoutParam |
Returns
Type | Description |
---|---|
DefaultLayoutGenerator[] | All the default layout generators in the system and any loaded custom IAddIn |
GetItemSelectorGenerator<T>(EntityDescriptor)
Returns a T, where T is a specific, non-default LayoutGenerator
Declaration
public ILayoutGenerator? GetItemSelectorGenerator<T>(EntityDescriptor descriptor) where T : ILayoutGenerator
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | descriptor | The descriptor for which you would like the generator |
Returns
Type | Description |
---|---|
ILayoutGenerator |
Type Parameters
Name | Description |
---|---|
T |
GetLayoutDescriptor(ILayoutGenerator, string, string)
Declaration
public Task<LayoutDescriptor> GetLayoutDescriptor(ILayoutGenerator generator, string uniqueLayoutName, string param)
Parameters
Type | Name | Description |
---|---|---|
ILayoutGenerator | generator | |
string | uniqueLayoutName | |
string | param |
Returns
Type | Description |
---|---|
Task<LayoutDescriptor> |
RegenerateLayouts()
Forces the system to reload all default layouts from the dlls and any custom loaded IAddIn
Declaration
public Task RegenerateLayouts()
Returns
Type | Description |
---|---|
Task |
RemoveAddInListeners()
Removes listeners.
Declaration
public void RemoveAddInListeners()