NotificationEvent.CommentText Method

Returns a comment string that is less than or equal to maxCommentChars.

Namespace:  Microsoft.TeamFoundation.VersionControl.Common
Assembly:  Microsoft.TeamFoundation.VersionControl.Common.Integration (in Microsoft.TeamFoundation.VersionControl.Common.Integration.dll)

Syntax

'Declaration
Protected Function CommentText ( _
    comment As String, _
    maxCommentChars As Integer _
) As String
protected string CommentText(
    string comment,
    int maxCommentChars
)
protected:
String^ CommentText(
    String^ comment, 
    int maxCommentChars
)
member CommentText : 
        comment:string * 
        maxCommentChars:int -> string
protected function CommentText(
    comment : String, 
    maxCommentChars : int
) : String

Parameters

  • maxCommentChars
    Type: System.Int32

    The maximum number of comment characters.

Return Value

Type: System.String
A string that represents the comment trimmed accordingly.

Remarks

The returned string is usually part of the e-mail 'Subject' and content titles.

The returned string is processed as follows: 1. Leading and trailing white space is removed 2. If the first newline occurs before the max, the string up to (but excluding the newline) is returned.

3. If the length of the (trimmed) comment is less than the max, it is returned 4. A substring of the first max characters with '...' suffixed is returned.

.NET Framework Security

See Also

Reference

NotificationEvent Class

Microsoft.TeamFoundation.VersionControl.Common Namespace