Based on the Java background, I think so:
The server provides the object to the client. This object must be executed on the server.
Server:
private string _S = "A";
public interface IFoo { void Bar(); }
private class Foo : IFoo {
void Bar() { _S = "B";}
}
public IFoo GetFoo() { return new Foo(); }
Customer:
IFoo foo = serverChannel.GetFoo();
foo.Bar();
Remoting is deprecated (everyone continues to point to WCF), and WCF does not support this at all ( WCF: is there any way to return an object that the server can execute? ), So how should I implement this behavior? Use of third-party components is possible if required.
I searched for SO but did not find a similar question. If this has already been answered, just let me know and I will delete.
source
share