Registers a method with a given name and signature.

        :param name: The name used to register the method
        :type name: str
        :param method: The method to register
        :type method: function
        :param method_signature: The method signature for the given function
        :type method_signature: MethodSignature | None

        .. versionadded:: 0.1.0

def register(self, name, method, method_signature=None):
        """Registers a method with a given name and signature.

        :param name: The name used to register the method
        :type name: str
        :param method: The method to register
        :type method: function
        :param method_signature: The method signature for the given function
        :type method_signature: MethodSignature | None

        .. versionadded:: 0.1.0
        """
        if inspect.ismethod(method):
            raise Exception("typedjsonrpc does not support making class methods into endpoints")
        self._name_to_method_info[name] = MethodInfo(name, method, method_signature)