This project is read-only.

Installing an Event Handler

Installing Event Handlers is just a matter of editing the TFS Event Handler Server config file to add in the new handler and then restarting the service.

These are defined within the "Events" section:
<Events>
            <!-- 
                        Use one of the following events:
                                        AclChangedEven
                                        Branchmovedevent
                                        BuildCompletionEvent
                                        BuildStatusChangeEvent
                                        CommonStructureChangedEvent
                                        DataChangedEvent
                                        IdentityChangedEvent
                                        IdentityCreatedEvent
                                        IdentityDeletedEvent
                                        MembershipChangedEvent
                                        WorkItemChangedEvent)
                        Then you need to add handlers for the events.
                                          
                   Example:
                           <Event eventType="WorkItemChangedEvent">
                                <Handlers>
                                    <Handler type="RDdotNet.TeamFoundation.WorkItemTracking.AssignedToHandler"
                                             assemblyFileName="RDdotNet.TeamFoundation.WorkItemTracking.AssignedTo.dll"
                                             assemblyFileLocation="~\EventHandlers\WorkItemTracking\">
                                    </Handler>
                                </Handlers>
                            </Event>
                    -->
            <Event eventType="WorkItemChangedEvent">
                <Handlers>
                    <Handler type="RDdotNet.TeamFoundation.WorkItemTracking.AssignedToHandler"
                             assemblyFileName="RDdotNet.TeamFoundation.WorkItemTracking.AssignedTo.dll"
                             assemblyFileLocation="~\EventHandlers\WorkItemTracking\">
                    </Handler>
                </Handlers>
            </Event>
        </Events>

As you can see you are theoretically allows to us any events. Please keep in mind that only the WorkItemChangedEvent and the CheckInEvent have been tested. When you add the "Event" tag with the corresponding eventType (which is an enumerator) this tells the system which specific events to subscribe to.

You can then add handlers to an event. These handlers are fired whenever these events are received.

Name Type Description
eventType RDdotNet.TeamFoundation.EventTypes Enumerator that defines the list of possible events.
type System.Type This must be a valid type in the assembly listed in assemblyFileName
assemblyFileName System.String This must be a valid assembly found in the assemblyFileLocation
assemblyFileLocation System.String A location within the servers file system that holds this assembly. ~ denotes the applications root.

Last edited May 30, 2008 at 9:20 AM by hinshelmw, version 1

Comments

No comments yet.