SqlNotificationRequest 类

定义

表示针对给定命令的通知请求。

public ref class SqlNotificationRequest sealed
public sealed class SqlNotificationRequest
type SqlNotificationRequest = class
Public NotInheritable Class SqlNotificationRequest
继承
SqlNotificationRequest

注解

此类提供对 SQL Server 2005 公开的查询通知服务的低级别访问权限。 对于大多数应用程序,该 SqlDependency 类提供了更简单的查询通知使用方式。 但是,如果需要对何时发生通知进行精细控制,或者需要自定义作为通知的一部分返回的消息数据,则 SqlNotificationRequest 类是要使用的。

构造函数

名称 说明
SqlNotificationRequest()

使用默认值创建类的新实例 SqlNotificationRequest

SqlNotificationRequest(String, String, Int32)

使用用户定义的字符串创建类的新实例 SqlNotificationRequest ,该字符串标识特定通知请求、预定义的 SQL Server 2005 Service Broker 服务名称的名称以及以秒为单位的超时时间。

属性

名称 说明
Options

获取或设置发布通知消息的 SQL Server Service Broker 服务名称。

Timeout

获取或设置一个值,该值指定在操作超时之前 SQL Server 等待更改发生的时间。

UserData

获取或设置此通知的应用程序特定标识符。

方法

名称 说明
Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅