DiscussionThread Class

A discussion is a comment thread associated with a block of code, a file or a code review.

Inheritance Hierarchy

System.Object
  Microsoft.TeamFoundation.Discussion.Client.DiscussionThread

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

Syntax

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

The DiscussionThread type exposes the following members.

Constructors

  Name Description
Public method DiscussionThread(IDiscussionManager, Int32, Uri) Constructs a discussion.
Public method DiscussionThread(IDiscussionManager, Int32, Uri, String) Constructs a discussion.
Public method DiscussionThread(IDiscussionManager, Int32, Uri, String, DiscussionPosition) Constructs a discussion.

Top

Properties

  Name Description
Public property Id The unique Id of a discussion. Id is 0 when the discussion is created and is assigned to a unique value after it is saved to the server.
Public property ItemPath Server path of the file in which the discussion occurs.
Public property LastUpdatedDate Time when the discussion is last updated on this client. This property only is updated when the client polls for updates.
Public property NeedsSave True if the discussion has changed and can be saved to the local store.
Public property Position Position in the file of the discussion.
Public property PublishedDate Time when the discussion is published and can be viewed by others.
Public property ReadStatus Tracks whether the discussion has been read.
Public property Revision Revision is incremented on the server every time a discussion is published. However, a publish call will not update the revision of the client discussion. The client revision only is updated when the client polls for updates.
Public property RootComment The root comment of the discussion. Setter only works for the first time only, when the RootComment is null, to ensure the discussion's threaded comments cannot be updated.
Public property SavedDate The DateTime of when the discussion was saved locally.
Public property Severity Indicates the severity of the discussion.
Public property Status Indicates the status of the discussion.
Public property VersionUri Uri of the shelveset or the changeset associated with the discussion.
Public property WorkItemId WorkItem Id of the code review request associated with the discussion.

Top

Methods

  Name Description
Public method AddComment(Comment, Comment) Adds a given comment to this discussion. An exception will be thrown if: 1. The parentComment is null but: a. The discussion has a root comment. b. The discussion is already deleted. 2. The parentComment has not yet been published to the server.
Public method AddComment(TeamFoundationIdentity, CommentType, String, Comment) Adds a new comment to this discussion. An exception will be thrown if: 1. The parentComment is null but: a. The discussion has a root comment. b. The discussion is already deleted. 2. The parentComment has not yet been published to the server.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
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