Given my previous post
did some more thoughts over it in this post
.Net compiler says no!!
An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
the above cannot be compiled
BUT XAF SAYS YES
Why? Cause it has its own type system the XafTypesInfo system. And the types are added it to it at runtime. Meaning? We can do anything!!!
Take for example the following implementation of the above
Cause modern programming is based on attributes the AttributeRegistrator example is most usefull when for example multiple developers wan to to work on the same class, the example was stolen from eXpand featurecenter application were that case is valid :) (Many developers work on the same file)