You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I'm trying to track the screenshot filenames to the appropriate action and wanted your thoughts on how this would be implemented.
Ive tried to locate examples of decorators communicating with each other and cant see any- and am unsure if this would create a hidden dependency because screenshot actor would have to "wrap" a reporting actor, in order for the reporting actor to get "notified" of the screenshot actions being taken.
I've used component design pattern to handle this in games but I dont think it follows the decorator pattern used throughout this app.
thoughts?
The text was updated successfully, but these errors were encountered:
Thanks for you interest in this project :)
I don't think those features should be coupled because the way they are designed creates a pipeline for the actions execution, meaning we could enable, disable or order them any way we want.
So what I can propose is to add an optional IObserver<T> to the TakeScreenshot extension method, that would notifiy when a screenshot has been taken.
var observer = new ConsoleObserver(); //an observer that writes in the console
var actor = new Actor("John")
.WithReporting(observer)
.TakeScreenshots(@"C:\Enablon\Screenshots", screenshotName, observer)
It would allow the notifications to end up in the same observer, meaning you would have the following output in the log.
Starting add an item
--- Starting Enter the value "milk"
--- Screenshot 1.jpg was taken
--- Ending Enter the value "milk"
--- Starting Click on some button
--- Screenshot 2.jpg was taken
--- Ending Click on some button
Ending add an item
Galad
changed the title
ReportingActor vs Screenshots
Notify that screenshots were taken when using TakeScreenhot in order to associate a screenshot with an action
Dec 6, 2017
Hi
I'm trying to track the screenshot filenames to the appropriate action and wanted your thoughts on how this would be implemented.
Ive tried to locate examples of decorators communicating with each other and cant see any- and am unsure if this would create a hidden dependency because screenshot actor would have to "wrap" a reporting actor, in order for the reporting actor to get "notified" of the screenshot actions being taken.
I've used component design pattern to handle this in games but I dont think it follows the decorator pattern used throughout this app.
thoughts?
The text was updated successfully, but these errors were encountered: