Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
        }