[ 
https://issues.apache.org/jira/browse/IGNITE-17796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17620762#comment-17620762
 ] 

Igor Sapego commented on IGNITE-17796:
--------------------------------------

[~ptupitsyn] looks good.

> .NET: Services do not work with default interface implementations
> -----------------------------------------------------------------
>
>                 Key: IGNITE-17796
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17796
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 2.13
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>              Labels: .NET
>             Fix For: 2.15
>
>
> The code below throws *"InvalidOperationException: Failed to invoke proxy: 
> there is no method 'Greet' in type 'MyService' with 1 arguments"*
> {code}
> using Apache.Ignite.Core;
> using Apache.Ignite.Core.Services;
> using var ignite = Ignition.Start();
> ignite.GetServices().DeployClusterSingleton("svc", new MyService());
> var svc = ignite.GetServices().GetServiceProxy<IMySvc>("svc");
> Console.WriteLine(svc.Greet("foo"));
> public interface IMySvc
> {
>     string Greet(object arg) => $"Hello, {arg}!";
> }
> class MyService : IService, IMySvc
> {
>     public void Init(IServiceContext context) { }
>     public void Execute(IServiceContext context) { }
>     public void Cancel(IServiceContext context) { }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to