Omer van Kloeten <gv******@spaz.ice.org> wrote:
I believe you mean the third approach.
Yes, sorry.
I have thought of using an external tool, but just like I don't "trust"
people to write the attribute themselves, I don't "trust" them to use that
external tool in their post-build events, as I will have no control over the
customers once the product will ship.
Yup, that's fair.
And besides, having to create an external tool reduces the strength and
wholeness of this design pattern.
Absolutely - it's just an unfortunate fact of life at the moment :(
Certainly it's not ideal - it would be nice if there could be some way
of writing attributes that affect compilation in a custom way, although
I don't know what the API to such a facility would look like.
I don't know exactly what your situation is, but you could also do the
verification when the assembly is loaded, and write out warnings if the
relevant information isn't present. I would at least hope that your
customers would test their plug-in implementations once before trying
to use them in a production environment! It's not a *great* solution,
but it may well be the best you can do at the moment.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too