By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Assembly metadata and event wiring.

P: n/a
I'm building a smart client application based off of the
example that is posted on windowsforms.com (and shown on
the .NET show). A windows form calls a webservice that
itterates through a directory, pulling meta data from all
the assemblies located in that directory. Then returns
that information for the form to consume and to be able to
dynamically load the assemblies.

What I've done is define 3 events that my dynamic
assemblies (Those downloaded from the web server) can
call. I want the stub application to capture these events
and to handel them (Either from different event handlers
or passing a string to one event of which type to fire).
(I plan on making the events the same name in every
dynamic assembly, BTW)

I've searched for 3 days on articles on how to do this.
Can anyone help?

Do I need to place special attributes on the event to pull
out of the assembly? ANY help would be appreciated...

Would this (and the extra credit) be easier if I signed
the assemblies with a strong name and let my application
grant full trust to the assemblies? (Which I'd rather not
do b/c of, of course, security issues. And I want this to
be as no touch as possible. A user may download this over
the internet so the application itself will not have the
full trust to grant to the assemblies.)

Extra credit :-) : I'd also like to take the XML outputted
from a web service (Which tells me what assemblies are
available) and cache that to the disk. If the web service
isn't available, read that XML. And if I can't reach the
web server to pull the assemblies down, is there a way I
can persist them to the disk and load the assemblies from
there?
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Sorry, this is the code I'm using right now....

Dim controlAsm As [Assembly] = [Assembly].LoadFrom
(ItemInfo.UrlLocation & ItemInfo.AssemblyName)

Dim controlType As Type =
controlAsm.GetType(ItemInfo.TypeName)
ControlToLoad =
Activator.CreateInstance(controlType)
owner.AddControl(ControlToLoad)
This is located on a click event of my stub application.

Thanks.
-----Original Message-----
I'm building a smart client application based off of the
example that is posted on windowsforms.com (and shown on
the .NET show). A windows form calls a webservice that
itterates through a directory, pulling meta data from all
the assemblies located in that directory. Then returns
that information for the form to consume and to be able todynamically load the assemblies.

What I've done is define 3 events that my dynamic
assemblies (Those downloaded from the web server) can
call. I want the stub application to capture these eventsand to handel them (Either from different event handlers
or passing a string to one event of which type to fire).
(I plan on making the events the same name in every
dynamic assembly, BTW)

I've searched for 3 days on articles on how to do this.
Can anyone help?

Do I need to place special attributes on the event to pullout of the assembly? ANY help would be appreciated...

Would this (and the extra credit) be easier if I signed
the assemblies with a strong name and let my application
grant full trust to the assemblies? (Which I'd rather not
do b/c of, of course, security issues. And I want this tobe as no touch as possible. A user may download this overthe internet so the application itself will not have the
full trust to grant to the assemblies.)

Extra credit :-) : I'd also like to take the XML outputtedfrom a web service (Which tells me what assemblies are
available) and cache that to the disk. If the web serviceisn't available, read that XML. And if I can't reach the
web server to pull the assemblies down, is there a way I
can persist them to the disk and load the assemblies from
there?
.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.