Пример #1
0
 protected override bool CanCall(BlockCall block)
 {
     if (block.ObjectID < 0 && _channelCalls.ContainsKey(block.MethodID))
     {
         return(true);
     }
     return(AccessGranted);
 }
Пример #2
0
 protected override void OnChannelCall(BlockCall block, MemoryStream resultStream)
 {
     if (_channelCalls.TryGetValue(block.MethodID, out ChannelCall method))
     {
         method(block.DataStream, resultStream);
     }
     else
     {
         throw new InvalidOperationException($"未能找到合适方法id = {block.MethodID}");
     }
 }