Beispiel #1
0
        public static String[] GetParamtersTypes(this IGeneralRawMemberNode member)
        {
            var name = member.GetNameId();

            if (name == null)
            {
                return(null);
            }

            if (!member.IsMethod())
            {
                return(null);
            }
            var leftBracketIndex = name.IndexOf("(");

            if (leftBracketIndex < 0)
            {
                return(new String[0]);
            }
            var paramters = name.Substring(leftBracketIndex + 1).TrimEnd(')');

            if (String.IsNullOrWhiteSpace(paramters))
            {
                return(new String[0]);
            }
            return(paramters.Split(','));
        }
Beispiel #2
0
        public static String GetFullName(this IGeneralRawMemberNode member)
        {
            var name = member.GetNameId();

            if (name == null)
            {
                return(null);
            }

            var leftBrackedIndex = name.IndexOf("(");

            if (leftBrackedIndex < 0)
            {
                return(name.Substring(2));
            }
            return(name.Substring(2, leftBrackedIndex - 2));
        }