Class SwitchTeam
This command executes the SwitchTeam system command
Lists all teams the user has access to as child commands.
Switches the team the current user is running in, and performs a RefreshAll to run the system under that new teamInheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: LemonEdge.ClientCore.dll
Syntax
[CommandDescriptorOptions(Command.SwitchTeam, null)]
public class SwitchTeam : EPCommandWithDescriptor, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
SwitchTeam(IRootController, IModelLayoutCommon)
Creates a new SwitchTeam command that lists all teams the user has access to as child commands.
Declaration
public SwitchTeam(IRootController root, IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | owner | The owning context for this command |
SwitchTeam(IRootController, IModelLayoutCommon, ITeam)
Creates a new SwitchTeam command that switches the current team to the specified one and refreshes the entire system to run under that new team
Declaration
protected SwitchTeam(IRootController root, IModelLayoutCommon owner, ITeam team)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutCommon | owner | The owning context for this command |
ITeam | team | The new team to run the entire system under |
Properties
Description
A user friendly description of this command
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
HasChildCommands
True if this is the root command listing all possible teams as children
Declaration
public override bool HasChildCommands { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
Guid |
Overrides
Title
The title of this command
Declaration
public override string Title { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
InternalCanExecute(object)
True if the command is running with an owner of the main application form
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
bool | True if the command is running with an owner of the main application form |
Overrides
InternalExecuteAsync(object)
Switches the team the current user is running in to the specified one, and performs a RefreshAll to run the system under that new team
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 teams this user has access to run in
Declaration
public override Task LoadChildrenAsync()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
Switch(IModelLayoutCommon, ITeam)
Switches the team the current user is running in to the specified one, and performs a RefreshAll to run the system under that new team
Declaration
public static Task Switch(IModelLayoutCommon owner, ITeam team)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context this command runs in |
ITeam | team | The new team to switch running the application under |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |