2016-10-01 5 views
0

Die Zeile wcfServiceObject:this gibt einen Fehler cannot convert from ... to ....wcfServiceObject: Fehler kann nicht konvertiert werden

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() 
    ) 
)}; 

Wie behebe ich dieses Problem?

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

Antwort

0

dachte ich, dass ich die interface für meinen Dienst implementieren sollte. Wie das folgende Beispiel für eine ShoppingCartService:

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

In diesem speziellen Fall hatte ich die IShoppingCartService Schnittstelle für die ShoppingCartService zu implementieren.

Verwandte Themen