当我点击团队基础服务器2012上的checkin项目时,如何在TFS上挂钩checkin事件 [英] How can I hook checkin event on TFS when I click checkin item on team foundation server 2012

查看:101
本文介绍了当我点击团队基础服务器2012上的checkin项目时,如何在TFS上挂钩checkin事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我问一个问题。我想在Visual Studio 2012上单击Team Foundation Server 2012时勾选checkin事件以查找已更改的源代码。请帮助我?



此致。



Mansurİşçel

Hi,

I ask a question please. I want to hook checkin event for changed source code in file when clicked checkin on Team Foundation Server 2012 on Visual Studio 2012. Kindly, can you help me ?

Sincerely.

Mansur İşçel

推荐答案

TFS 2010引入了一个带有服务器端事件处理程序的新概念,它使用一个插件模型,允许自定义代码在TFS事件上执行,并在TFS上下文中运行。因此,这里的两大优势是您不再需要部署单独的基于SOAP的Web服务,并且由于您在TFS上下文中运行,因此您可以直接访问TFS API,并且在不同进程中的跳数更少。



TFS 2010 introduced a new concept with Server-side event handlers, which use a Plug-in model that allows custom code to execute upon a TFS event, and run under the TFS context. So the two big advantages here is that you no longer have to deploy a separate SOAP-based web service, and since you are running under the TFS context, you have direct access to the TFS API with much less hops across different processes.

The solution consists of a .NET Class that implements the Microsoft.TeamFoundation.Framework.Server. ISubscriber interface:




public interface ISubscriber
{
    string Name { get; }
    SubscriberPriority Priority { get; }

    EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType, object notificationEventArgs, out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties);
    Type[] SubscribedTypes();
}





您可以在以下链接中找到完整的参考:

团队基金会服务器2010与订阅者的事件处理 [ ^ ]

http://www.almguide.com/2011/12/ tfs-server-side-event-handlers / [ ^ ]


这篇关于当我点击团队基础服务器2012上的checkin项目时,如何在TFS上挂钩checkin事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆