Пример #1
0
 def func(method_obj):
     method_descriptor = _MethodDescriptor(method_obj.__name__, method_obj, request_class, response_class)
     method_obj._descriptor = method_descriptor
     
     def decorated(self, message):
         return self.channel.call_method(method_descriptor, message)
     return decorated
Пример #2
0
 def func(method_obj):
     method_descriptor = _MethodDescriptor(method_obj.__name__, method_obj, request_class, response_class)
     
     method_obj._descriptor = method_descriptor
     return method_obj