IEventService.SubscribeEvent Method (String, String, String, DeliveryPreference)
Subscribes the specified user to the event.
Namespace: Microsoft.TeamFoundation.Framework.Client
Assembly: Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Function SubscribeEvent ( _
userId As String, _
eventType As String, _
filterExpression As String, _
preferences As DeliveryPreference _
) As Integer
int SubscribeEvent(
string userId,
string eventType,
string filterExpression,
DeliveryPreference preferences
)
int SubscribeEvent(
String^ userId,
String^ eventType,
String^ filterExpression,
DeliveryPreference^ preferences
)
abstract SubscribeEvent :
userId:string *
eventType:string *
filterExpression:string *
preferences:DeliveryPreference -> int
function SubscribeEvent(
userId : String,
eventType : String,
filterExpression : String,
preferences : DeliveryPreference
) : int
Parameters
userId
Type: System.StringThe user ID.
eventType
Type: System.StringThe fully qualified name of the event type.
filterExpression
Type: System.StringA string that describes how to filter instances of the event type.
preferences
Type: Microsoft.TeamFoundation.Framework.Client.DeliveryPreferenceDescribes how an event notification is delivered.
Return Value
Type: System.Int32
A unique identifier that represents the SubscriptionId.
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.