Recycle bin items are created using the relevant IRecycleBinService methods that occur every time a MoveToRecycleBin data event is raised from the item's manager.
There are two ways to modify this default behavior.
All Recycle bin Item factories that implement DataItemRecycleBinFactory use a list of IRecycleBinItemAdapters to populate the desired properties of a RecycleBinDataItem. Each adapter casts the specified IDataItem to the required type and transfers some of its properties to the resulting RecycleBinDataItem.
To change the existing implementation of a specific adapter, you must first find the adapter that is responsible for the specific data item type and then register an inheriting adapter type:
Another way to add or alter information in a Recycle bin item about a deleted data item is to implement and register a custom IRecycleBinItemFactory for populating the properties of every Recycle bin item created using the IRecycleBinService.
To register a custom Recycle bin item factory, you must create a named registration in the ObjectFactory using the name of the manager that is responsible for the data items used to populate the Recycle bin item:
public class MyCustomPageNodeRecycleBinFactory : PageNodeRecycleBinFactory
protected override IList<
> GetRecycleBinItemAdapters(IDataItem item)
var baseAdapters = base.GetRecycleBinItemAdapters(item);
if (item is PageNode)
Back To Top