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
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.AddToFavourites, null)]
public class AddToFavourites : EPCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IEPCommand, ICommand, IDisposable
Constructors
AddToFavourites(IModelLayoutCommon)
Creates a new AddToFavourites command
Declaration
public AddToFavourites(IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context for this command |
Properties
SubscribeToLayoutChange
Returns true indicating this command should respond to the current selected layout changing
Declaration
public override bool SubscribeToLayoutChange { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
---|---|---|
System.Object | parameter | THe command parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | 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 |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |