2016-10-01 5 views
0

wcfServiceObject:thiscannot convert from ... to ...というエラーを出力します。wcfServiceObject:これはエラーを変換できません

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

どのようにこの問題を解決できますか?

コードから:https://azure.microsoft.com/nl-nl/documentation/articles/service-fabric-reliable-services-communication-wcf/

答えて

0

私は私のサービスのためinterfaceを実装する必要があることを考え出しました。 ShoppingCartServiceについては、以下の例のように:

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

この特定のケースでは、私はShoppingCartServiceためIShoppingCartServiceインターフェイスを実装する必要がありました。

関連する問題