IEventService.SubscribeEvent Method (String, String, String, DeliveryPreference, String)

Subscribes the specified user to the event.

Namespace:  Microsoft.TeamFoundation.Framework.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

int SubscribeEvent(
	string userId,
	string eventType,
	string filterExpression,
	DeliveryPreference preferences,
	string classification
)

Parameters

userId
Type: System.String

The user ID.

eventType
Type: System.String

The fully qualified name of the event type.

filterExpression
Type: System.String

A string that describes how to filter instances of the event type.

preferences
Type: Microsoft.TeamFoundation.Framework.Client.DeliveryPreference

Describes how an event notification is delivered.

classification
Type: System.String

A classification tag for the event subscription.

Return Value

Type: System.Int32
A unique identifier that represents the SubscriptionId.

The SubscriptionId can unsubscribe from the subscription.

Users can have multiple subscriptions to the same event type but receive only one notification, regardless of the number of matching subscriptions.

Show: