Class EntityCollectionCommand<T>
A base command implementation used for opening a collection of any particular entity type in the system
Inheritance
EntityCollectionCommand<T>
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
public abstract class EntityCollectionCommand<T> : EPCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IEPCommand, ICommand, IDisposable where T : class, IBaseEntity
Type Parameters
Name | Description |
---|---|
T | The type of entity to open a collection of |
Remarks
For instance to create a command button to open all users:
[CommandDescriptorOptions(LemonEdge.API.Client.Command.Users)]
public class UsersCommand : EntityCollectionCommand<Entities.User> { public Users (IModelController root, IModelLayoutCommon owner) : base(root, owner) { } }
Constructors
EntityCollectionCommand(IRootController, IModelLayoutCommon)
Creates a new EntityCollectionCommand
Declaration
protected EntityCollectionCommand(IRootController root, IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | owner | The owning context for this command |
Methods
InternalCanExecute(object)
True. Can always be executed
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
bool | True |
Overrides
InternalExecuteAsync(object)
Opens a new layout with the DisplayableItemDescriptorForCollection<T> display item that
displays a collection of the T
entity type
Declaration
public override Task InternalExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |