blast2857
Static helper class/method design question
Hello, I have a design question. I'm writing a helper class where the purpose is solely to find types on the assembly (via reflection and making use of certain patterns) for a certain path. Since I may need to get the path multiple times for multiple files I thought that caching it would be the proper way to approach this.
But I have a few concerns, I always hear that having state in a static class, in this case the cache is not a good idea. But I also don't really need an instance of the class since all it really is it's a helper so I'm not sure how would I go for designing this in a different way. Likewise, I'm not a fan of the methods existing there but never being "normally" called (only via reflection after being grabbed via the attribute)
Is this a good design or where could I improve / change it?
7 replies