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 _ConvertToExceptionTag(XElement xml) { var details = xml.GetMemberDetails("cref", new XmlDocumentation()); var tag = new ExceptionTag { Name = "param", ExceptionType = details.MemberName }; return(tag); }