473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Assembly metadata and event wiring.

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
1 2273
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Fink | last post by:
I am writing a c# unattended windows application and I would like to write an event to handle any type of application error by gracefully degrading and writing a message to an error log. Errors...
0
by: Nadav | last post by:
Hi All, - I am working on a tool that manipulate managed assemblies, some of the functionality provided by the tool require manipulating the metadata sections of the managed assembly in a way it...
7
by: Oisin Grehan | last post by:
Hi, I have a UserControl derived class: <ns:votingbutton runat="server" id="btn1" onclick="votingbuttonclick" /> My question is, what code do I need in place in the codebehind for this to...
2
by: Brad | last post by:
I have one of those seemingly simple questions that evades/confuses me. I've created an assembly with bass classes (classes meant to be inherited in other assemblys). In a secondary assembly (my...
1
by: Scott M | last post by:
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...
2
by: Tommy Wang | last post by:
During an interview, I was asked with question 'how do you add information to a .NET assembly as metadata' I really have no idea until now, could someone please help? thanks in advance
6
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi, I recently moved the Global.asax.cs from the project root to the App_Code folder and now I'm getting an error message The type 'Hineynu3.Global' is ambiguous: it could come from assembly...
5
by: Andrew Robinson | last post by:
I have a page that can load a number of different user controls. Each of these user controls inherits from a common base class and the controls are loaded based on application state, status, etc...
3
by: cristalink | last post by:
Hi, I have a C++/CLI DLL which I marked with in a cpp file. Is there a standard tool from Microsoft that takes a .DLL file and displays all the .NET attributes of the assembly? Thanks, ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.