A service to record changes that are made on the website, and handle undoing/redoing the changes.
Details
This service would support a single base class that has methods to override for undo and redo. The service itself would only handle adding to the undo/redo stack and popping items from it when requested.
If the redo stack has items in it when a new item is added to the undo stack, clear the redo stack.
There will be no database storage for these edit stacks. Upon a page reload, all data is cleared.
Individual child classes handle making the proper calls to undo and redo changes. Some actions may need to change the database or call other services. A IServiceCollection (or one of its scopes) will be passed as the only parameter to the method. All other data should come from the class itself.
Summary
A service to record changes that are made on the website, and handle undoing/redoing the changes.
Details
This service would support a single base class that has methods to override for undo and redo. The service itself would only handle adding to the undo/redo stack and popping items from it when requested.
If the redo stack has items in it when a new item is added to the undo stack, clear the redo stack.
There will be no database storage for these edit stacks. Upon a page reload, all data is cleared.
Individual child classes handle making the proper calls to undo and redo changes. Some actions may need to change the database or call other services. A
IServiceCollection
(or one of its scopes) will be passed as the only parameter to the method. All other data should come from the class itself.