/// <summary> /// Merges the parameters with comments. /// </summary> /// <param name="header">The header.</param> /// <param name="comments">The comments.</param> public static void SyncParametersWithComments(MethodNTHeader_ header, MethodNTComment_ comments) { var parameters = header.Header_Parameters; foreach (MethodNTHeaderParameter_ parameter in parameters) { var name = parameter.ParameterName.Replace("@", ""); MethodNTCommentParameter_ parmComment = comments.CommentParameters.FirstOrDefault(x => x.ParameterName == name); if (parmComment != null) { parameter.ParameterComment = parmComment.ParameterComment; } } }
public static MethodNTComment_ Create(List <string> sourceLines, ref int ii, out List <string> Attribute_Lines) { var result = new MethodNTComment_(); // {Name = name, Value = value}; List <string> parameterLines; string ctiCodeLine; MethodNTComment_Methods.Comment_Parts(sourceLines, ref ii, out result.CommentSummary, out parameterLines, out Attribute_Lines, out result.CommentReturn, out ctiCodeLine); // Add the parameters foreach (string parameterLine in parameterLines) { var parameter = MethodNTCommentParameter_.Create(parameterLine); result.CommentParameters.Add(parameter); } return(result); }