Beispiel #1
0
        /// <summary>
        /// The get documentation parameter tag.
        /// </summary>
        /// <param name="doc">
        /// The doc.
        /// </param>
        /// <param name="parameterTag">
        /// The parameter tag.
        /// </param>
        /// <returns>
        /// The <see cref="ParamTag"/>.
        /// </returns>
        private ParamTag GetDocumentationParameterTag(XmlNode doc, ParamTag parameterTag)
        {
            parameterTag.DocumentationTagFound = true;

            parameterTag.Description = doc.InnerText.Trim('\r').Trim('\n').Trim();
            return(parameterTag);
        }
Beispiel #2
0
        public void run()
        {
            AxClass axClass = MetadataProvider.Classes.Read(classItem.Name);

            bool allMethodsDocumented = true; // Please do not disappoint me! :)

            foreach (AxMethod method in axClass.Methods)
            {
                IContent tagContent = null;
                string   devDoc     = string.Empty;

                if (!method.Source.Contains("<summary>"))
                {
                    tagContent = new SummaryTag(method);
                    tagContent = new ParamTag(tagContent, method);
                    tagContent = new ExceptionTag(tagContent, method);
                    tagContent = new ReturnsTag(tagContent, method);
                    tagContent = new RemarksTag(tagContent, method);

                    method.Source = method.Source.Insert(0, $"{tagContent.getContent()}\n");

                    allMethodsDocumented = false; // Shame on you! :(
                }
            }

            if (allMethodsDocumented)
            {
                CoreUtility.DisplayInfo("All your methods are documented already! I've transfered $500,00 to your bank account as reward!");
            }
            else
            {
                this.MetaModelService.UpdateClass(axClass, this.ModelSaveInfo);
            }
        }
        private static Tag _ConvertToParamTag(XElement xml)
        {
            var tag = new ParamTag
            {
                Name      = "param",
                ParamName = xml.Attribute("name").Value
            };

            return(tag);
        }