jascam / CodePlexFoo

0 stars 0 forks source link

VS 2010 TFS: Sample required for method ProcessEvent #418

Open jascam opened 7 years ago

jascam commented 7 years ago

Visual Studio 2010 team Foundation Server (TFS) question:   I'm using ISubscriber.ProcessEvent to process quality change events. This method is defined as follows:   public EventNotificationStatus ProcessEvent(TeamFoundationRequestContext requestContext, NotificationType notificationType, object notificationEventArgs, out int statusCode, out string statusMessage, out ExceptionPropertyCollection properties)   There is no info or samples on the three OUT parameters statusCode, statusMessage and properties. What are their purposes and what values should I put into them? A sample would be very helpful.

Migrated CodePlex Work Item Details

CodePlex Work Item ID: '9623' Vote count: '2'

jascam commented 7 years ago

Hi,

There are 2 ways to call the Subscribers:

  1. Before TFS decides to do something, i.e. check-out, update workitem.
  2. Publish Notification. (Email or Event service)

These 3 parameters are used for the first scenarios. If your plugin deny the operation, then you can set these paramters. status = // The error code you defines. StatusMessage = //Why you deny the operation properties = new ExceptionPropertyCollection(); Properties.Set ("Otherdetailed error inforamtion1 ", ... ); Properties.Set ("Otherdetailed error inforamtion2 ", ... ); ....

If you allow the operation, please use following code

statusCode = 0;
properties = null;
statusMessage = string.Empty;

This comment was posted by Ruizyi on 12/22/2011

jascam commented 7 years ago

This comment was posted by on 2/21/2013