Class CustomCommand
Inheritance
CustomCommand
Assembly: LemonEdge.API.Entities.Auto.dll
Syntax
[DataContract]
public class CustomCommand : BaseEntityWithPermissions, ICustomCommand, IBaseEntityWithPermissions, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ISetCopier, IHasVersion, ICloneableAsync<ICustomCommand>, ISetCopierCloneAlterer
Constructors
CustomCommand()
Declaration
Properties
CanCommandBeExecutedSnippetID
Declaration
public Guid? CanCommandBeExecutedSnippetID { get; set; }
Property Value
CanCommandBeExecutedSnippetID_Label
Declaration
public string CanCommandBeExecutedSnippetID_Label { get; set; }
Property Value
CanCommandBeExecutedSnippetID_Label_Silent
Declaration
[NotMapped]
public string CanCommandBeExecutedSnippetID_Label_Silent { get; set; }
Property Value
CommandExecutionSnippetID
Declaration
[RequiredNoDefaultIDValidation]
public Guid CommandExecutionSnippetID { get; set; }
Property Value
CommandExecutionSnippetID_Label
Declaration
public string CommandExecutionSnippetID_Label { get; set; }
Property Value
CommandExecutionSnippetID_Label_Silent
Declaration
[NotMapped]
public string CommandExecutionSnippetID_Label_Silent { get; set; }
Property Value
CommandHelpURL
An optional url for help documentation around this commands function
Declaration
[StringLength(1000)]
public string CommandHelpURL { get; set; }
Property Value
CommandIconID
Declaration
public Guid CommandIconID { get; set; }
Property Value
CommandIsQuickAccess
Indicates if the command should also be available on a quick access menu
Declaration
public bool CommandIsQuickAccess { get; set; }
Property Value
CommandParameter
An optional parameter for executing this command. For views that run against queries/charts/etc the name of the query can be a parameter limiting the button to only appearing against that query. You can hardcode parameter values for the code snippet using @paramvalue=value. All parameters should be seperated by a new line.
Declaration
public string CommandParameter { get; set; }
Property Value
CommandTitle
The title of this command
Declaration
[StringLength(500)]
public string CommandTitle { get; set; }
Property Value
A user friendly tool tip for this command functionality
Declaration
[StringLength(2000)]
public string CommandToolTip { get; set; }
Property Value
CopierCloneType
Declaration
public SetCopierCloneType CopierCloneType { get; set; }
Property Value
Description
A user friendly description of this command
Declaration
[StringLength(2000)]
public string Description { get; set; }
Property Value
EntityTypeID
The type this collection or single view button is executed against
Declaration
public Guid? EntityTypeID { get; set; }
Property Value
The related type this collection view button is against
Declaration
public Guid? EntityTypeRelatedID { get; set; }
Property Value
IsEnabled
Indicates if this command is enabled and available in the UI
Declaration
public bool IsEnabled { get; set; }
Property Value
IsSystem
Indicates this item is part of the core system. Any changes will be overwritten if the version number is lower than
the provided version number and the item is also marked as a system item.
Declaration
[Required]
public bool IsSystem { get; set; }
Property Value
Name
Declaration
[Unique]
[StringLength(500)]
public string Name { get; set; }
Property Value
RunForEachSelectedRow
If this command is against a collection, this indicates the command should be run individually against each selected item.
Declaration
public bool RunForEachSelectedRow { get; set; }
Property Value
UIPlacement
Declaration
[EnumDataType(typeof(CustomCommandUIPlacement))]
public CustomCommandUIPlacement UIPlacement { get; set; }
Property Value
Declaration
[NotMapped]
public string UIPlacement_Tooltip { get; set; }
Property Value
Version
Indicates the version number of this item. Changes will only be overwritten if the provided new item has a higer
version number than this one.
Declaration
[Required]
[DatabasePropertyValidation("MyItem.IsSystem", "var allUserTeams = await Cache.GetAllItems<LemonEdge.API.Entities.Administration.IUserTeam>(); (await Cache.GetAllItems<LemonEdge.API.Entities.Administration.ITeam>()).Any(x => allUserTeams.Where(ut => ut.UserID == User.ID).Select(ut => ut.TeamID).Contains(x.ID) && x.CanEditSystemItems)", "User is not authorized to modify system items.")]
public short Version { get; set; }
Property Value
Methods
AlterCopiedItem(IEntityUpdater, UserInfo, IReadOnlyCache, IBaseEntity)
A custom ability to alter this item when it is was copied by the user in the UI, not when it is being imported
Declaration
public Task AlterCopiedItem(IEntityUpdater host, UserInfo user, IReadOnlyCache cache, IBaseEntity sourceItem)
Parameters
Returns
Type |
Description |
Task |
A task inidicating the finishing of this method
|
CopyFromEntity(IBaseEntity)
Declaration
protected override void CopyFromEntity(IBaseEntity src)
Parameters
Overrides
CopyFromSource(ICustomCommand)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(ICustomCommand source)
Parameters
Type |
Name |
Description |
ICustomCommand |
source |
The source object to copy all values from.
|
Determines whether the source item should be copied based on the provided relationship
Declaration
public bool CopyRelatedItem(IBaseEntity sourceItem, EntityRelationship rel)
Parameters
Type |
Name |
Description |
IBaseEntity |
sourceItem |
The original source item this item was copied from
|
EntityRelationship |
rel |
The particular relationship from the source item
|
Returns
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods