Calling Reflected Methods Asyncronously

G

Guest

hi guys and gals,

I've just run into an interesting problem. I'm trying to call assembly
methods which are not bound to the main project assembly. The Interface is
always the same, however due to differences in processing lenght, I thought
it be better to invoke some of the methods asyncronously and allow the system
to continue processing.

However, the code line 'executeMyMethod.Invoke(myObjectInstance, null)'
where executeMyMethod is of type MethodInfo and myObjectInstance is the
Reflected Type there is no BeginInvoke.

Now, I thought about using a delegate as I would normally do to perform
Async operations on normal methods, but I just cannot seam to figure it out
or if its even possible on reflected methods?

Has anyone tried and succeeded to do this, or do I have to go down the road
of implimenting the Async call withing the Reflected Assembly which I'd
prefer not to do...

Any help would be appreciated

Regards

Andy
 
M

Mattias Sjögren

Andy,
Now, I thought about using a delegate as I would normally do to perform
Async operations on normal methods, but I just cannot seam to figure it out
or if its even possible on reflected methods?

Delegate.CreateDelegate() can give you a delegate from a MethodInfo or
mathod name if that's what you're looking for.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top