/// <summary> /// build summary text for a simple return value type. /// 'int', 'string' etc. /// </summary> /// <param name="methodDeclaration">the return type.</param> /// <returns>a string containing the simple return value text.</returns> public string BuildSummaryTextForSimpleReturnValue(MethodDeclarationSyntax methodDeclaration) { var name = methodDeclaration.Identifier.Text; var sentence = this.SplitCamelCaseWords(name); var words = sentence.Count() == 1 ? this.SplitFirstParameterName(methodDeclaration) : sentence; // booleans have special text. if (methodDeclaration.GetReturnTypeKind() == SyntaxKind.BoolKeyword) return $"true if the {string.Join(" ", this.RemoveArticles(words.ToArray()))}, otherwise false."; var prefix = this.PrefixAnA(Convert.ToString(methodDeclaration.ReturnType)); return $"{prefix} {Convert.ToString(methodDeclaration.ReturnType)} containing the {string.Join(" ", words)}."; }