public MethodInfo GetMethodInfo(int methodNumber) { if (methodNumber < 0) { throw new RuntimeException("Метод не найден"); } var name = String.Empty; var alias = String.Empty; NativeApiProxy.GetMethodName(_object, methodNumber, 0, str => name = NativeApiProxy.Str(str) ); NativeApiProxy.GetMethodName(_object, methodNumber, 1, str => alias = NativeApiProxy.Str(str) ); var paramCount = NativeApiProxy.GetNParams(_object, methodNumber); var paramArray = new ParameterDefinition[paramCount]; for (int i = 0; i < paramCount; i++) { if (NativeApiProxy.HasParamDefValue(_object, methodNumber, i)) { paramArray[i].HasDefaultValue = true; paramArray[i].DefaultValueIndex = ParameterDefinition.UNDEFINED_VALUE_INDEX; } } ; return(new MethodInfo { Name = name, Alias = alias, IsFunction = NativeApiProxy.HasRetVal(_object, methodNumber), IsDeprecated = false, IsExport = false, ThrowOnUseDeprecated = false, Params = paramArray, }); }