Seems like this would be super simple, but I'm struggling to find what I need.
I'm implementing a TFS 2013 event handler and simply want to get a reference to the Work Item that raised the change event. It seems easy enough to get the title, but I can't find a property or method in the event signature objects that gives me either a reference to the WorkItem object or the information I'd need to go query it (e.g. the ID).
public EventNotificationStatus ProcessEvent(
TeamFoundationRequestContext requestContext,
NotificationType notificationType,
object notificationEventArgs,
out int statusCode,
out string statusMessage,
out ExceptionPropertyCollection properties)
{
var ev = notificationEventArgs as WorkItemChangedEvent;
string WorkItemTitle = ev.WorkItemTitle; /* easy enough */
/*********** need help with this bit *********/
int ChangedWorkItemID = ???
OR
WorkItem ChangedWorkItem= ???
}
Note: this code has been stripped down to bare bones to make it easier to read and focus on the problem at hand.