Пример #1
0
        private string GetParameterNames(MethodDefinition method)
        {
            string parameters = method.Parameters.Trim();

            if (parameters == String.Empty)
            {
                return(String.Empty);
            }

            parameters = CSharpFormattingTools.
                         RemoveUnwantedBracketText(parameters);

            parameters = CSharpFormattingTools.
                         RemoveUnwantedAngleBracketText(parameters);

            StringBuilder sb = new StringBuilder();

            foreach (string s in parameters.Split(','))
            {
                string   p     = s.Trim();
                string[] split = p.Split();

                sb.Append(split[split.Length - 1]);
                sb.Append(", ");
            }

            return(sb.ToString().Trim().TrimEnd(','));
        }