Class CommandFactory
Handles creations of all types of commands.
Inherited Members
Namespace: LemonEdge.Client.UI.Core.Commands
Assembly: LemonEdge.Client.UI.Core.dll
Syntax
public class CommandFactory : ICommandFactory, IHaveAddInListeners
Constructors
CommandFactory(IDomainContextEventHandler, IReflectionHelper, IFactoryInjector, ILogger<CommandFactory>)
Declaration
public CommandFactory(IDomainContextEventHandler handler, IReflectionHelper reflector, IFactoryInjector factoryInjector, ILogger<CommandFactory> logger)
Parameters
Type | Name | Description |
---|---|---|
IDomainContextEventHandler | handler | |
IReflectionHelper | reflector | |
IFactoryInjector | factoryInjector | |
ILogger<CommandFactory> | logger |
Methods
AddAddInListeners()
Adds listeners.
Declaration
public void AddAddInListeners()
EPCommand(IModelLayoutCommon, Guid)
Creates a command implementation for the specified unique command type
Declaration
public EPCommand EPCommand(IModelLayoutCommon modelLayoutCommon, Guid type)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | modelLayoutCommon | The host context in which the command will operate |
Guid | type | The id of the unique command to create |
Returns
Type | Description |
---|---|
EPCommand | A command implementation for the specified unique command |
GetParameterType(Guid)
Returns the parameter type associated with the specified unique command type.
Retrieved from CommandDescriptorOptionsAttribute marked against a command implementation
Declaration
public Type GetParameterType(Guid commandType)
Parameters
Type | Name | Description |
---|---|---|
Guid | commandType | The command type to retrieve any parameter type for |
Returns
Type | Description |
---|---|
Type | The parameter type associated with the specified unique command type. |
ReloadCommands()
Reloads the default commands.
Declaration
public Task ReloadCommands()
Returns
Type | Description |
---|---|
Task |
RemoveAddInListeners()
Removes listeners.
Declaration
public void RemoveAddInListeners()
Separator()
The static separator instance that has no command action.
Declaration
public ViewCommandSeparator Separator()
Returns
Type | Description |
---|---|
ViewCommandSeparator |
ViewCommand(Type, params object[])
Creates a ViewCommand of provided type.
Declaration
public ViewCommand ViewCommand(Type type, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The concrete type |
object[] | args | The args to send to the command's constructor |
Returns
Type | Description |
---|---|
ViewCommand | The view command |
ViewCommand<TCommand>(params object[])
Creates a ViewCommand of the type TCommand.
Declaration
public ViewCommand ViewCommand<TCommand>(params object[] args) where TCommand : ViewCommand
Parameters
Type | Name | Description |
---|---|---|
object[] | args | The args to send to the command's constructor |
Returns
Type | Description |
---|---|
ViewCommand | The view command |
Type Parameters
Name | Description |
---|---|
TCommand | The concrete command type |