DiscussionThread.AddComment 方法 (TeamFoundationIdentity, CommentType, String, Comment)
添加新注释到此讨论。
将会引发异常,则:1. parentComment 为空,但:a. 讨论具有根注释。
b. 讨论已删除。
2. parentComment 未发布到服务器。
命名空间: Microsoft.TeamFoundation.Discussion.Client
程序集: Microsoft.TeamFoundation.Discussion.Client(在 Microsoft.TeamFoundation.Discussion.Client.dll 中)
语法
声明
Public Function AddComment ( _
author As TeamFoundationIdentity, _
commentType As CommentType, _
content As String, _
parentComment As Comment _
) As Comment
public Comment AddComment(
TeamFoundationIdentity author,
CommentType commentType,
string content,
Comment parentComment
)
参数
- author
类型:Microsoft.TeamFoundation.Framework.Client.TeamFoundationIdentity
新注释的作者。
- commentType
类型:Microsoft.TeamFoundation.Discussion.Client.CommentType
新注释的类型。
- content
类型:System.String
新注释的内容。
- parentComment
类型:Microsoft.TeamFoundation.Discussion.Client.Comment
新注释的父级。如果为 null,新的注释可以是根。
返回值
类型:Microsoft.TeamFoundation.Discussion.Client.Comment
添加的新注释。
备注
此方法不对服务器行程。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。