0

The line wcfServiceObject:this gives an error cannot convert from ... to ....

return new[] { new ServiceReplicaListener((context) =>
    new WcfCommunicationListener<IShoppingCartService>(
        wcfServiceObject:this,
        serviceContext:context,
        //
        // The name of the endpoint configured in the ServiceManifest under the Endpoints section
        // that identifies the endpoint that the WCF ServiceHost should listen on.
        //
        endpointResourceName: "WcfServiceEndpoint",

        //
        // Populate the binding information that you want the service to use.
        //
        listenerBinding: WcfUtility.CreateTcpListenerBinding()
    )
)};

How do I resolve this problem?

Code from: https://azure.microsoft.com/nl-nl/documentation/articles/service-fabric-reliable-services-communication-wcf/

rotgers
  • 1,992
  • 1
  • 15
  • 25

1 Answers1

0

I figured that I should implement the interface for my service. Like the example below for a ShoppingCartService:

internal sealed class ShoppingCartService : StatefulService, IShoppingCartService
{
    ...
}

In this particular case I had to implement the IShoppingCartService interface for the ShoppingCartService.

rotgers
  • 1,992
  • 1
  • 15
  • 25