Interface ISetItemLoaderOverride
Some ISetCopier implementations need a custom method for processing the imported item after.
For instance transactions use this to ensure a newly copied transacton is InProgress if the original was finalized or cancelled. It also indicates that only root level transactions should be opened by the UI when copied, not the sub transactions - they appear as children of the root one anyway in the UI
Namespace: LemonEdge.Core
Assembly: API.dll
Syntax
public interface ISetItemLoaderOverride
Properties
DisplayItemOnCopy
Indicates if the items should appear in the UI when copied from a grid. Typically child items shouldn't be added as items in a grid or opened on copy, just the root item itself
Declaration
bool DisplayItemOnCopy { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ForceNewItemOnCopy
Indicates if the specified item should always be created as a new item. For instance when copying sub transactions are always created as new items
Declaration
bool ForceNewItemOnCopy { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ProcessLoadedSetItems(IEnumerable<IBaseEntity>, IEntityUpdater)
Provides the item a chance to implement custom behaviour when being copied or imported. This is called against the first instance of an item for all items of this type imported during the process.
Declaration
virtual Task ProcessLoadedSetItems(IEnumerable<IBaseEntity> setItems, IEntityUpdater updater)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IBaseEntity> | setItems | All items that have been imported by the process LemonEdge.Core.SetItemInfo.Import(LemonEdge.Core.IEntityUpdater,LemonEdge.API.Core.UserInfo,LemonEdge.Entities.IReadOnlyCache,System.Boolean,LemonEdge.Core.Descriptors.EntityRelationship) that are of the same type |
IEntityUpdater | updater | The current context everything has been imported into |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the finishing of the task |