473,396 Members | 1,997 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,396 software developers and data experts.

AppDomains and Dynamic un/re-loading

I'm currently developing a client that connects to a server and exchanges
data with the server back and forth. The client retains the data in specified
classes depending on what was received. While adding a plugin type API I ran
into the following problem:

I want users to be able to dynamically un/re-load their plugins as needed,
but without having to restart the client. Searching quickly pointed me to
articles on AppDomains. However none of them seem to explain how I can allow
these plugins to access data that in being retained by the client in its
classes.

So basicly:

I have a client with info.
I have plugins that need to access this from the plugin while maintaining
the ability to dynamically un/re-load the plugin.

Any ideas or articles that could explain how to go about this?
Nov 17 '05 #1
1 1257
ASayre <AS****@discussions.microsoft.com> wrote:
I'm currently developing a client that connects to a server and exchanges
data with the server back and forth. The client retains the data in specified
classes depending on what was received. While adding a plugin type API I ran
into the following problem:

I want users to be able to dynamically un/re-load their plugins as needed,
but without having to restart the client. Searching quickly pointed me to
articles on AppDomains. However none of them seem to explain how I can allow
these plugins to access data that in being retained by the client in its
classes.

So basicly:

I have a client with info.
I have plugins that need to access this from the plugin while maintaining
the ability to dynamically un/re-load the plugin.

Any ideas or articles that could explain how to go about this?


Welcome to the wonderful world of marshalling :)

This is a tricky topic, with various options. If you're able to make
everything you the plugins need derive from MarshalByRefObject at some
point, it's probably not *too* bad - otherwise you'll need to be very
careful in exactly how things are marshalled when. Alternatively, you
might want to try to load as much as possible into the temporary
AppDomain, leaving your "main" AppDomain as a pretty empty shell which
just does enough to get the other AppDomains up and running, and handle
unloading and reloading.

I don't have any articles to hand on how best to do this, but you
should probably have a look at the NUnit source code
(http://www.nunit.org) as that does exactly the same kind of thing as
it sounds like you need to.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daylor | last post by:
hi. i have mult thread vb.net application. it has 30 threads. each thread serves 1 phone caller. the question : is there a reason , to create appdomain for each Phone Service ? meaning 30...
4
by: Mountain Bikn' Guy | last post by:
I need some advice on this. I am working on a fairly complex calculator app (C#) with lots of functions (and these functions in turn use math functions from an unmanaged C DLL). A calculation takes...
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
0
by: Brian Takita | last post by:
Hello, I'm getting the following error at the end of this message when trying to run the ReportManager and the ReportServer: Assembly system.data.dll security permission grant set is...
1
by: billr | last post by:
hi there, I hope that someone will be able to shed some light on little old confused me. We are developing an application which will be deployed onto a Terminal Server machine. The application...
1
by: Evan Camilleri | last post by:
I am creating an DLL dynamically. Sometime or another this DLL must be recompiled and thus a new version must be uploaded. I was told that to do this I have to load the assembly in a seperate...
0
by: kayakyakr | last post by:
I'm working with a set of experiments in a large system that is using AppDomains for isolation and wants to make a call out to an umanaged dll. The test dll has two methods, SetNumber(int num) and...
3
by: | last post by:
If this is simple, forgive my ignorance, but I'm coming from the CompactFramework where we don't use AppDomains. I did a fair bit of archive searching and couldn't find an answer and I got no...
0
by: jeremyje | last post by:
I would like to create an application where I have many concurrent processes being managed by a monitoring process. Each process that is "managed" will be invoked from an assembly dll (think...
0
by: PRR | last post by:
Here is a code i found on "how to enumerate appdomains in a current process". The original code was posted by Thomas Scheidegger Add the following as a COM reference -...
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:
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.