达文西

Results 20 comments of 达文西

![image](https://user-images.githubusercontent.com/20830435/120306842-e1c4f900-c304-11eb-8c57-a0fbe681aabe.png)

![image](https://user-images.githubusercontent.com/20830435/120306981-0caf4d00-c305-11eb-8e5e-c74c673604ba.png)

@AArnott My English is not very good. and I don't quite understand what you mean This is an example: https://github.com/beetlex-io/BeetleX-Samples/tree/master/XRPC.DelegateInvoke Server: https://github.com/beetlex-io/BeetleX-Samples/blob/69e9e0f15ea4d8bb4f8a740540d348866e415372/XRPC.DelegateInvoke/Server/Program.cs#L55 Client: https://github.com/beetlex-io/BeetleX-Samples/blob/69e9e0f15ea4d8bb4f8a740540d348866e415372/XRPC.DelegateInvoke/Client/DelegateApi.cs#L10

> In StreamJsonRpc this would look like: > > ```cs > interface IMyRpcInterface > { > Task ListOrders(int employee, string employeeid); > Task Task } > ``` > > On...

yes ,i find a doc: https://github.com/microsoft/vs-streamjsonrpc/blob/main/doc/dynamicproxy.md but no sample.....only document Where are examples of "delegate event"?

@vmykytiuk it's a runtime bug. https://github.com/dotnet/runtime/issues/53271 https://github.com/dotnet/runtime/issues/43685 https://github.com/dotnet/runtime/issues/30917

https://github.com/snikeguo/EmbedXrpc

我的简单实现。已经测试可以用 ``` using System; using System.Reflection; using System.Threading.Tasks; namespace ConsoleApp1 { interface IMyInterFace { Task HelloWorld(string s); } class MyInterFaceImpl : ServerInfo,IMyInterFace { public Task HelloWorld(string s) { Console.WriteLine($"Hello World!{s}");...

![image](https://user-images.githubusercontent.com/20830435/90984053-2fa61700-e5a5-11ea-9d5f-7c1e7c02d54b.png)

单实例的话,就不用创建对象了,找到最前面第一次创建的对象,更新当前的连接信息即可。 顺便说一句,用户如果继承连接信息类的话,就赋值当前连接信息操作,如果用户没继承连接信息类,只是继承了IMyInterface(底层实现强转成父类,肯定是null),就不操作,说明用户不需要连接信息。