register method
Implementation
void register(Method method, CallHandler handler) {
if (_closed || _started) {
throw StateError('Register services before opening calls');
}
if (!method.path.startsWith('/') || method.path.contains('\x00')) {
throw ArgumentError.value(method.path, 'method');
}
if (_methods.containsKey(method.path)) {
throw StateError('Duplicate method ${method.path}');
}
_methods[method.path] = _Registration(method, handler);
}