Пример #1
0
        static string GetArgString(Definitions.ParamDefinition p, int i)
        {
            string modify    = GetModifyString(p);
            string paramName = !string.IsNullOrEmpty(p.CSharpName) ? NamedTool.VarName(p.CSharpName) : "p" + i;

            return(modify + paramName);
        }
Пример #2
0
        static string GetParamString(Definitions.ParamDefinition p, int i)
        {
            string modify = GetModifyString(p);
            var    sb     = new StringBuilder();

            if (p.Attrs.Length > 0)
            {
                sb.Append($"[{string.Join(", ", p.Attrs)}] ");
            }
            sb.Append(modify).Append(p.Type.CSharpName).Append(' ').Append(NamedTool.VarName(p.CSharpName));
            return(sb.ToString());
        }