TeamFoundationSqlNotificationService.RegisterNotification Method (TeamFoundationRequestContext, String, Guid, SqlNotificationHandler, Boolean)
RegisterNotification is used to register a handler for an eventClass within a database.
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Function RegisterNotification ( _
requestContext As TeamFoundationRequestContext, _
databaseCategory As String, _
eventClass As Guid, _
handler As SqlNotificationHandler, _
filterByAuthor As Boolean _
) As Boolean
public bool RegisterNotification(
TeamFoundationRequestContext requestContext,
string databaseCategory,
Guid eventClass,
SqlNotificationHandler handler,
bool filterByAuthor
)
public:
bool RegisterNotification(
TeamFoundationRequestContext^ requestContext,
String^ databaseCategory,
Guid eventClass,
SqlNotificationHandler^ handler,
bool filterByAuthor
)
member RegisterNotification :
requestContext:TeamFoundationRequestContext *
databaseCategory:string *
eventClass:Guid *
handler:SqlNotificationHandler *
filterByAuthor:bool -> bool
public function RegisterNotification(
requestContext : TeamFoundationRequestContext,
databaseCategory : String,
eventClass : Guid,
handler : SqlNotificationHandler,
filterByAuthor : boolean
) : boolean
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextDatabase to connect the notfication to.
databaseCategory
Type: System.StringThe type of notification to listen for.
eventClass
Type: System.GuidThe handler method to call when a notification is received.
handler
Type: Microsoft.TeamFoundation.Framework.Server.SqlNotificationHandlerWhether or not the caller wants notifications filtered that were self authored.
- filterByAuthor
Type: System.Boolean
Return Value
Type: System.Boolean
Returns true if the notification was successfully register, false if not.
.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.