Наследование: BaseDocumentationElement, IReferencable
Пример #1
0
 internal void AddMethod(Method method)
 {
     methods.Add(method);
 }
Пример #2
0
        /// <summary>
        /// Returns a comma-delimited list of the parameters of a given method
        /// </summary>
        /// <param name="method"></param>
        /// <returns></returns>
        public string OutputMethodParams(Method method)
        {
            var sb = new StringBuilder();
            var markExtensionMethodInstance = method.IsExtension;

            foreach (MethodParameter parameter in method.Parameters)
            {
                if (markExtensionMethodInstance)
                {
                    sb.Append("this ");
                    markExtensionMethodInstance = false;
                }
                sb.Append(Format(parameter.Reference));
                sb.Append(" ");
                sb.Append(parameter.Name);
                sb.Append(", ");
            }

            if (sb.Length > 0)
                sb.Length -= 2;

            return sb.ToString();
        }
Пример #3
0
        public string OutputMethodParams(Method method)
        {
            var sb = new StringBuilder();

            foreach (MethodParameter parameter in method.Parameters)
            {
                sb.Append(h(parameter.Reference.PrettyName));
                sb.Append(" ");
                sb.Append(parameter.Name);
                sb.Append(", ");
            }

            if (sb.Length > 0)
                sb.Length -= 2;

            return sb.ToString();
        }