Extracted interfaces from UndoService and ChangeFactory for IoC container registration #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Nathan,
I was wanting to use Monitored Undo Framework in a Prism based project I’m working on, but Prism’s IoC functionality (like most others) seems to require services to have an interface abstraction for container registration and dependency injection.
To facilitate this, in this this pull request I’ve extracted interfaces from UndoService and ChangeFactory and moved XML documentation comments to the interfaces to avoid repetition.
These interfaces also make it easier to mock UndoService and ChangeFactory in unit tests.
With these changes I can register UndoService and ChangeFactory with the IoC container by adding the following lines to the overriden RegisterTypes method in my application’s App.xaml.cs:
Thank you for your time and consideration.
Regards,
Daniel O’Connell