Implementing multiple contracts


All replies

  • Yes, you can decorate more than one port in your service class with the AlternateServicePort attribute.


    Service Tutorial 9 [1] shows how to use this attribute.


    Hope this helps,




    Wednesday, October 03, 2007 11:59 PM
  • So the code would look something like this? What does it mean for a service to have two states?


    class ImplementationService : DsspServiceBase


    private generic1.GenericState1 _state1 = new generic1.GenericState1();
    private generic2.GenericState2 _state2 = new generic2.GenericState2();
    [ServicePort("/GenericService1Implementation", AllowMultipleInstances = false)]
    private generic1.GenericService1Operations _mainPort1 = new generic1.GenericService1Operations();
    [ServicePort("/GenericService2Implementation", AllowMultipleInstances = false)]
    private generic2.GenericService2Operations _mainPort2 = new generic2.GenericService2Operations();
    Thursday, October 04, 2007 11:16 PM
  •  Oh, I think the last part of service tutorial 9 answers this. Thanks.


    Friday, October 05, 2007 2:15 AM