public static string GetArgumentsAsText(this MethodBase method)
        {
            var parameterInfos = method.GetParameters();
            var arguments      = String.Join(", ",
                                             CommonExtensions.GetParamAsPrettyList(parameterInfos));

            if (!method.IsStatic)
            {
                var thisText = String.Format("const {0}& _this", method.DeclaringType.ToCppName(true));
                return(parameterInfos.Length == 0
                    ? thisText
                    : String.Format("{0}, {1}", thisText, arguments));
            }
            return(arguments);
        }
Ejemplo n.º 2
0
        public static string GetArgumentsAsText(this MethodBase method, bool pinvoke = false)
        {
            var parameterInfos = method.GetParameters();
            var arguments      = string.Join(", ",
                                             CommonExtensions.GetParamAsPrettyList(parameterInfos, pinvoke));

            if (method.IsStatic)
            {
                return(arguments);
            }
            var thisText = $"const {method.DeclaringType.ToCppName()}& _this";

            return(parameterInfos.Length == 0
                ? thisText
                : $"{thisText}, {arguments}");
        }