1
我正在開發項目,以在服務器端實施TFS中的一些簽入策略。作爲其中的一部分,我試圖獲得現在正在提交的變更集的歷史記錄。但是,當檢查發生時,我得到的變更集號碼爲-1。我不知道爲什麼會發生這種情況。我懷疑是否僅在執行ProcessEvent方法後才分配變更集編號。感謝你的幫助。點擊TFS簽入事件
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
}
}
}
}
感謝您的回覆。 – Jaleel 2012-03-29 15:07:19