Class LoadFavourite
This command executes the LoadFavourite system command
A command which has each IFavourite item for this user loaded as child commands to this one which load that item when executed
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: LemonEdge.ClientCore.dll
Syntax
[CommandDescriptorOptions(Command.LoadFavourite, null)]
public class LoadFavourite : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
LoadFavourite(IRootController, IModelLayoutCommon)
Creates a new LoadFavourite command which has all favourites for this user as child commands
Declaration
public LoadFavourite(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
Description
The description of the favourite item to load
Declaration
public override string Description { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
HasChildCommands
Returns true if this is the root command, otherwise false if it loads an individual favourite item
Declaration
public override bool HasChildCommands { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
IconID
The default icon associated with the favourite item to be loaded
Declaration
public override Guid IconID { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Overrides
ReloadChildrenOnEachOpen
True for the root command-Indicates the favourite child items should be reloaded each time the root command is activated
Declaration
public override bool ReloadChildrenOnEachOpen { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Title
The name of the favourite item to load
Declaration
public override string Title { get; }
Property Value
| Type | Description |
|---|---|
| string |
Overrides
Methods
InternalCanExecute(object)
True - can open favourites
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
| Type | Name | Description |
|---|---|---|
| object | parameter | The command parameters |
Returns
| Type | Description |
|---|---|
| bool | True |
Overrides
InternalExecuteAsync(object)
Opens the favourite item and displays it to the 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 |
Overrides
LoadChildrenAsync()
Loads all the favourite items from the cache and adds the as child LoadFavourite commands for each favourite item that can be loaded by the user
Declaration
public override Task LoadChildrenAsync()
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |
Overrides
OpenFavourite(IModelLayoutCommon, IFavourite)
Opens the specified favourite item into the mainform
Declaration
public static Task OpenFavourite(IModelLayoutCommon owner, IFavourite fav)
Parameters
| Type | Name | Description |
|---|---|---|
| IModelLayoutCommon | owner | The owning host to load the favourite item into |
| IFavourite | fav | The favourite item to load |
Returns
| Type | Description |
|---|---|
| Task | A task indicating the completion of the operation |