Class AddToFavourites
This command executes the AddToFavourites system command
Gets the current displayed item from the active layout and adds it to the list of IFavourite items for the user
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: LemonEdge.ClientCore.dll
Syntax
[CommandDescriptorOptions(Command.AddToFavourites, null)]
public class AddToFavourites : EPCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IEPCommand, ICommand, IDisposable
Constructors
AddToFavourites(IRootController, IModelLayoutCommon)
Creates a new AddToFavourites command
Declaration
public AddToFavourites(IRootController root, IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | owner | The owning context for this command |
Properties
SubscribeToLayoutChange
Returns true indicating this command should respond to the current selected layout changing
Declaration
protected override bool SubscribeToLayoutChange { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
InternalCanExecuteAsync(object)
Returns true if there is a current active layout that is displaying a single entity that does not already exist in the current users list of favourite items
Declaration
public override Task<bool> InternalCanExecuteAsync(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | THe command parameter |
Returns
Type | Description |
---|---|
Task<bool> | True if there is a current active layout that is displaying a single entity that does not already exist in the current users list of favourite items |
Overrides
InternalExecuteAsync(object)
Adds the displayed item against the current active layout to the list of favourite entities for the current logged in user
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 |