Class RefreshContext
This command executes the RefreshTab system command
Refreshes the current active tab if this command has a IModelLayouHost as an owner, or the actual IModelLayoutDisplayer if that is the owner
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands
Assembly: ClientCore.dll
Syntax
[CommandDescriptorOptions(Commands.RefreshTab, null)]
public class RefreshContext : EPCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IEPCommand, ICommand, IDisposable
Constructors
RefreshContext(IModelLayoutCommon)
Creates a new RefreshContext command
Declaration
public RefreshContext(IModelLayoutCommon owner)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutCommon | owner | The owning context for this command |
Properties
SubscribeToLayoutChange
True - This command reacts to changes in the active layout.
Declaration
public override bool SubscribeToLayoutChange { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
InternalCanExecute(Object)
Returns true if the layout to be refreshed is not displaying a new item as its main displayed item. You can not refresh something that is new.
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parameter | The command parameter |
Returns
Type | Description |
---|---|
System.Boolean | True if the layout to be refreshed is not displaying a new item as its main displayed item. You can not refresh something that is new. |
Overrides
InternalExecuteAsync(Object)
Refreshes the current active tab if this command has a IModelLayouHost as an owner, or the actual IModelLayoutDisplayer if that is the owner
The refresh actually refreshes the context for a layout, so if this context is shared across more than one layout than all those affected layouts will also be refreshed
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 |
Overrides
Refresh(IModelLayoutDisplayer)
Refreshes the current active tab if this command has a IModelLayouHost as an owner, or the actual IModelLayoutDisplayer if that is the owner
The refresh actually refreshes the context for a layout, so if this context is shared across more than one layout than all those affected layouts will also be refreshed
Declaration
public static Task Refresh(IModelLayoutDisplayer layout)
Parameters
Type | Name | Description |
---|---|---|
IModelLayoutDisplayer | layout | The layout to refresh the context of and reload |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |