Share via


Comment Class

A comment is a part of a discussion. When a discussion is initiated, it should have a root comment by the initiator, and other comments by the contributors.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Discussion.Client.Comment

Namespace:  Microsoft.TeamFoundation.Discussion.Client
Assembly:  Microsoft.TeamFoundation.Discussion.Client (in Microsoft.TeamFoundation.Discussion.Client.dll)

Syntax

'Declaration
Public NotInheritable Class Comment
public sealed class Comment
public ref class Comment sealed
[<Sealed>]
type Comment =  class end
public final class Comment

The Comment type exposes the following members.

Properties

  Name Description
Public property Author The person who creates the comment.
Public property CommentType Indicates whether the comment is a text or a code change, and so on
Public property Content The content of the comment.
Public property Discussion This is a client-only property to reference the discussion thread of this comment entry.
Public property DiscussionId Id of the discussion that owns the comment.
Public property Id The Id of a a comment. Id is 0 when the comment is first created and is assigned to an incrementing value after it is saved to the server.
Public property IsDeleted True if the comment is deleted.
Public property NeedsSave True if the comment has changed and can be saved to the local store.
Public property ParentComment The direct parent comment of the comment.
Public property PublishedDate Time when the comment is published and can be viewed by others.
Public property SavedDate The DateTime of when the comment was saved locally.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method GetChildComments Returns the direct child comments of this comment. The method wraps a copy of the list of child comments in a readonly collection.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString (Overrides Object.ToString().)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.TeamFoundation.Discussion.Client Namespace