Class ExportDefinition
A view command that exports any ISetCopier implemented entities into an xml format describing all their data and related entity structures
This is used for exporting system configuration of top level entities such as IDataset, and any custom entities implementing ISetCopier
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Commands.ViewCommands
Assembly: LemonEdge.ClientCore.dll
Syntax
public class ExportDefinition : ViewCommand, IHasChildren<EPCommandWithDescriptor>, IHasChildren, IDisposable, IEPCommandWithDescriptor, IEPCommand, ICommand, ICommandDescriptor
Constructors
ExportDefinition(IRootController, IModelLayoutDisplayer, IGridSelector, EntityDescriptor)
Creates a new ExportDefinition view command
Declaration
public ExportDefinition(IRootController root, IModelLayoutDisplayer owner, IGridSelector view, EntityDescriptor desc)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | The root controller, for service access. |
IModelLayoutDisplayer | owner | The owning context of this command |
IGridSelector | view | The grid holding the selected items to be exported |
EntityDescriptor | desc | The entity descriptor for the type of data being exported into xml |
ExportDefinition(IRootController, IModelLayoutDisplayer, Func<IEnumerable<object>>, EntityDescriptor)
Declaration
public ExportDefinition(IRootController root, IModelLayoutDisplayer owner, Func<IEnumerable<object>> getSelectedItems, EntityDescriptor desc)
Parameters
Type | Name | Description |
---|---|---|
IRootController | root | |
IModelLayoutDisplayer | owner | |
Func<IEnumerable<object>> | getSelectedItems | |
EntityDescriptor | desc |
Fields
XMLFileTypes
A list of the files types that we can export xml definitions into
Declaration
public static (string FileTypeName, string fileType)[] XMLFileTypes
Field Value
Type | Description |
---|---|
(string FileTypeName, string fileType)[] |
Properties
Description
A user friendly description of this command
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
IconID
Declaration
public override Guid IconID { get; }
Property Value
Type | Description |
---|---|
Guid |
Overrides
OverlayIconID
On some clients another image can be overlayed on the bottom right of the main icon (for indicating add, remove, etc)
This optional overlay image can be specified here, either a ImageType or ImageID
Declaration
public override Guid? OverlayIconID { 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
ToolTip
A user friendly tool tip for this command functionality, by default the Description
Declaration
public override string ToolTip { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
InternalCanExecute(object)
Returns true if there are selected grid items that implement ISetCopier
Declaration
public override bool InternalCanExecute(object parameter)
Parameters
Type | Name | Description |
---|---|---|
object | parameter | The command parameter |
Returns
Type | Description |
---|---|
bool | True if there are selected grid items that implement ISetCopier |
Overrides
InternalExecuteAsync(object)
Prompts the user for a file location to save the export to, then enumerates all the ISetCopier and exports them into a single SetItemInfo which is serialized as xml
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
RemoveEventHandlersOnDispose()
Provides an inheriting command the opoortunity to remove any event handlers being listened to before this command is disposed
Declaration
protected override void RemoveEventHandlersOnDispose()