Пример #1
0
        /// <summary>
        /// Generates a (potentially multi-line) Xml doc comment for a Param element.
        /// </summary>
        /// <param name="paramName">The name of the parameter.</param>
        /// <param name="comment">The formatted string to embed in a Param element.</param>
        /// <param name="isCSharp">Whether or not the doc comment is for C#.</param>
        /// <returns>The collection of generated Xml doc comments.</returns>
        internal static CodeCommentStatementCollection GenerateParamCodeComment(string paramName, string comment, bool isCSharp)
        {
            System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(paramName), "paramName cannot be empty");
            System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(comment), "comment cannot be empty");

            return(CodeGenUtilities.GetDocComments("<param name=\"" + paramName + "\">" + comment + "</param>", isCSharp));
        }
Пример #2
0
 /// <summary>
 /// Generates a (potentially multi-line) Xml doc comment for a Returns element.
 /// </summary>
 /// <param name="comment">The formatted string to embed in the Returns element.</param>
 /// <param name="isCSharp">Whether or not the doc comment is for C#.</param>
 /// <returns>The collection of generated Xml doc comments.</returns>
 internal static CodeCommentStatementCollection GenerateReturnsCodeComment(string comment, bool isCSharp)
 {
     System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(comment), "comment cannot be empty");
     return(CodeGenUtilities.GetDocComments("<returns>" + comment + "</returns>", isCSharp));
 }
Пример #3
0
 /// <summary>
 /// Generates a (potentially multi-line) Xml doc comment for a Summary element.
 /// </summary>
 /// <param name="comment">The formatted string to embed within a Summary element.  If it contains line breaks, it will become multiple comments.</param>
 /// <param name="isCSharp">Whether or not the doc comment is for C#.</param>
 /// <returns>The collection of generated Xml doc comments.</returns>
 internal static CodeCommentStatementCollection GenerateSummaryCodeComment(string comment, bool isCSharp)
 {
     System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(comment), "comment cannot be empty");
     return(CodeGenUtilities.GetDocComments("<summary>" + Environment.NewLine + comment + Environment.NewLine + "</summary>", isCSharp));
 }