当我点击团队基础服务器2012上的checkin项目时,如何在TFS上挂钩checkin事件

编程入门 行业动态 更新时间:2024-10-28 06:30:57
本文介绍了当我点击团队基础服务器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与订阅者的事件处理 [ ^ ] www.almguide/2011/12/ tfs-server-side-event-handlers / [ ^ ]

更多推荐

当我点击团队基础服务器2012上的checkin项目时,如何在TFS上挂钩checkin事件

本文发布于:2023-07-25 05:24:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1208079.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:当我   团队   事件   服务器   基础

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!