On Nov 27, 1:02 pm, Marc Gravell <marc.grav...@gmail.comwrote:
Maybe if you post how you expect to eventually consume the completed
EventWrapper (i.e. your use-case) we might suggest the best solution?
On Nov 27, 1:02 pm, Marc Gravell <marc.grav...@gmail.comwrote:
Maybe if you post how you expect to eventually consume the completed
EventWrapper (i.e. your use-case) we might suggest the best solution?
Here is the gist of what I am trying to do.
We have lots of business objects to make for lots of projects. Right
now the most time-consuming thing is the creation of the business
objects, writing each of their properties, writing all their SQL and
all the other gobbledy gook.
I want to make a tool that allows the developer to pick columns from
tables (which I have already done) and have it pull out the correct
type, do string length/other data verification, and write base-line
SQL. I have everything I need to do that now. I wrote a reflection
class that can execute generated code. I have code that builds C# and
compiles it.
Now, generally, I don't intend to run the generated Assemblies, or
generate them. My main intent is to create the source code, which I
have already done. However, I am currently in the process of creating
an XML-based format that will allow me to configure B.O.s and have the
effects take place instantly without needing to recompile. The problem
comes when my . . . wait a minute!
Actually, now that I think about it, you can only raise an event
inside a class anyway! My source code generator should be responsible
for creating code for raising events, not the EventInfo class. The
only thing you really should be able to do to a reflected Event *is*
add or remove handlers, which my code already supports.
I can't think of a good reason to allow reflection to raise events.
Thank you for the verification. Now I can get this code generator to
work!
Thanks, you may have just helped me save my company a lot of time and
money.
!Travis