![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | 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) |
| | 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) |
| | 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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Generic Class: Passing Data Type to Placeholder | .NET General | |||