Example #1
0
 public static Type GetResponseType(this OpcodeTypeComponent self, Type request)
 {
     if (!self.requestResponse.TryGetValue(request, out Type response))
     {
         throw new Exception($"not found response type, request type: {request.GetType().Name}");
     }
     return(response);
 }
Example #2
0
 public static ushort GetOpcode(this OpcodeTypeComponent self, Type type)
 {
     return(self.typeOpcodes[type]);
 }
Example #3
0
 public static Type GetType(this OpcodeTypeComponent self, ushort opcode)
 {
     return(self.opcodeTypes[opcode]);
 }
Example #4
0
 public static bool IsOutrActorMessage(this OpcodeTypeComponent self, ushort opcode)
 {
     return(self.outrActorMessage.Contains(opcode));
 }