Class RemoveFromFavourites
This command executes the RemoveFromFavourites system command
Gets the current displayed item from the active layout and removes it from the list of IFavourite items for the user
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.RemoveFromFavourites, null)]
public class RemoveFromFavourites : EPCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IEPCommand, ICommand, IDisposable
Constructors
RemoveFromFavourites(IModelLayoutCommon)
Creates a new RemoveFromFavourites command
Declaration
public RemoveFromFavourites(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 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 already exist in the current users list of favourite items |
Overrides
InternalExecuteAsync(Object)
Removes the displayed item against the current active layout from 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 |