PSClassUtils
PSClassUtils copied to clipboard
[R] Implementing the Command pattern
Analyze if we could simplify how we generate the command to Out-PSGraph using the Command Pattern
For the ones that are unfamiliar with the pattern, I recommend watching these videos:
-> https://www.youtube.com/watch?v=7Pj5kAhVBlg
This one is a bit longer, but also very good. -> https://www.youtube.com/watch?v=9qA5kw8dcSU
Ideally I would like to discuss the design of a possible solution. Please send UML (ish) diagrams via photo or so.
I know, this is not the most beautifullest piece of art, but this is a start:

I am not 100% happy with this design, but It is a start to reflect / think on.
Basically, we have:
- A GraphCommand which inherits from Command
- A GraphParam Base type.
- Each possible parameter would implement GraphParam.
- The Execute() Method of the GraphCommand object would invoke the call.