![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Passing instance data via ServiceHost I have a single class which is used from mutliple ServiceHost instances. I need this to simulate several environments on one machine. I need to somehow pass some information from the time I create the ServiceHost down to the contract class. 1) I looked for a static method or other that would be accesible from the contract class, but did not find any. 2) I can use singleton constructor and pass an instance of the class with the data. But the docs are very sparse and when it talks about singleton and based on the error I received, it appears not only singleton to serialize requests - I dont want that. 3) I could make them separate processes or appdomains, but I would really prefer to avoid that for simplicity reasons as well as manageablility. -- "Programming is an art form that fights back" http://www.KudzuWorld.com/ Need a professoinal technical speaker at your event? See www.woo-hoo.net |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Passing instance data via ServiceHost Chad Z. Hower wrote: > 3) I could make them separate processes or appdomains, but I would > really prefer to avoid that for simplicity reasons as well as > manageablility. FWIW I put them in AppDomains. This allows me to control instance data via statics in classes or the working directories. But input still welcome for curiosity sake. -- "Programming is an art form that fights back" http://www.KudzuWorld.com/ Need a professoinal technical speaker at your event? See www.woo-hoo.net |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Passing instance data via ServiceHost Why can't you use static class with multiple services in the same process ( domain ) , just a hint Arkady "Chad Z. Hower" <chad-ng@hower.org> wrote in message news:OrYq7uy4GHA.1848@TK2MSFTNGP06.phx.gbl... > Chad Z. Hower wrote: >> 3) I could make them separate processes or appdomains, but I would >> really prefer to avoid that for simplicity reasons as well as >> manageablility. > > FWIW I put them in AppDomains. This allows me to control instance data > via statics in classes or the working directories. > > But input still welcome for curiosity sake. > > -- > "Programming is an art form that fights back" > http://www.KudzuWorld.com/ > Need a professoinal technical speaker at your event? See www.woo-hoo.net |
My System Specs![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Generic Class: Passing Data Type to Placeholder | Etienne-Louis Nicolet | .NET General | 4 | 08-08-2008 01:42 AM |