My team has a lot of IOC conventions that look something like...
if (type.Namespace == "My.Fun.Namespace")
{
// do stuff
}
Of course, maintaining this kind of thing becomes brutal after awhile, and we would rather not. The only option I could think of was to store these all in one place, as string constants or something of that nature, but that isn't a lot better... We have been considering making classes that basically serve as namespace identifiers in order to have almost an anchor type to key off of, like, say...
if (type.Namespace == typeof(My.Fun.Namespace.MarkerClass).Namespace)
{
// do stuff
}
But that just feels weird. So is there another way to solve this one that we just don't know about? If not, has anyone had any luck with the whole marker class concept?