我正在研究在服务器端的TFS中实现一些签入策略的项目.作为其中的一部分,我正在尝试获取变更集的历史记录.但是当签入时,我将变更集编号设置为-1.我不知道为什么会这样.我怀疑是否仅在执行ProcessEvent方法后分配变更集编号.感谢您的帮助.
public EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType,
object notificationEventArgs, out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties)
{
statusCode = 0;
properties = null;
statusMessage = string.Empty;
if (notificationType == NotificationType.DecisionPoint)
{
try
{
if (notificationEventArgs is CheckinNotification)
{
CheckinNotification notification = notificationEventArgs as CheckinNotification;
int changeId = notification.Changeset;; // here I get the Changeset as -1
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
926 次 |
| 最近记录: |