2 Services: Same Type, different behavior

Hi all,

I have implemented a services, and I want to host 2 instances of it on the same machine. Each service instance will have it's session and will have a different behavior.

How can i do this, if the <service> in the configuration file is identified by its name which is the full name of its class

Any idea

10x

Guy Burstein



Answer this question

2 Services: Same Type, different behavior

  • Melsom

    Create two (empty) derived classes:

    public class Service1 : Service {}

    public class Service2: Service {}

    Roman



  • Melody Zhao

    Yet another solution altogether is to add the behaviors dynamically by the host, and keep the same type.

    Thanks,

    Juval Lowy, IDesign Inc.


  • 2 Services: Same Type, different behavior