1
This commit is contained in:
@@ -500,6 +500,15 @@ namespace BITKit.Net
|
||||
_rpcMethods.TryAdd(methodInfo.Name, methodInfo);
|
||||
_rpcHandles.TryAdd(methodInfo.Name, rpcHandle);
|
||||
}
|
||||
foreach (var eventInfo in rpcHandle.GetType().GetEvents())
|
||||
{
|
||||
var att = eventInfo.GetCustomAttribute<NetRpcAttribute>();
|
||||
if(att is null)continue;
|
||||
var handle = eventInfo.EventHandlerType.GetMethod("Invoke");
|
||||
_rpcMethods.AddOrUpdate(eventInfo.Name, handle, (s, info) => handle);
|
||||
_rpcHandles.AddOrUpdate(eventInfo.Name, rpcHandle, (s, info) => rpcHandle);
|
||||
}
|
||||
|
||||
}
|
||||
[NetRpc]
|
||||
public string MyRpcTest(string hello)
|
||||
|
Reference in New Issue
Block a user