public MappedMethod MapMethod(byte methodId, MethodInfo methodInfo) { if (_mappedMethods[methodId] != null) throw new ArgumentException($"Failed to map method '{methodInfo.Name}', a method with id '{methodId}' has already been mapped", nameof (methodId)); var mappedMethod = new MappedMethod(this, methodId, methodInfo); _mappedMethods[methodId] = mappedMethod; return mappedMethod; }
public MappedMethod MapMethod(byte methodId, MethodInfo methodInfo) { if (_mappedMethods[methodId] != null) { throw new ArgumentException($"Failed to map method '{methodInfo.Name}', a method with id '{methodId}' has already been mapped", nameof(methodId)); } var mappedMethod = new MappedMethod(this, methodId, methodInfo); _mappedMethods[methodId] = mappedMethod; return(mappedMethod); }