I was quite suprised when I saw the ChartStyleType usage for registering new bar types. May I ask why did you choose this style of registering? It's only a matter of time before a user tries to install two different 3rd party bar types with same ChartStyleType resulting in a confilct. Why don't you provide an internal repository with e.g. int RegisterBarType(Type customBarType) method, which would assign the numeric id internally (I suppose you need it somewhere deep in the code).
And another question, why did you decide to have single OnStateChange() for many independent tasks instead of several virtual methods like SetDefaults(), BeforeConfigure(), BeforeHistorical() and similar?
This is quite a big contrast to other modern features you use. It reminds me of old C with global variables or huge switch statements.
Thank you
Comment