Interesting question! I think if your methods are pure you can safely make the class static. Otherwise, you'll probably want to at least mock it in some tests, so that rules out the static class (unless you're willing to have settable static Funcs, but that's way too ugly IMHO). Of course, when you code against a static method you lose all the benefits of IoC. Then again, if your methods are pure that's not much of a problem.
-- Mauricio On Mon, May 30, 2011 at 3:39 PM, Tomek Pluskiewicz <[email protected]>wrote: > Hi > > Usually when applying the DI pattern I used to register nearly all of my > classes with the container. > > However it had recently occured to me, that maybe there are classes which > do not have any dependencies and could be left alone static. I'm aware of > the downsides but I'd like to know what are your thoughts? > > Regards > Tomasz > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
