你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

WebPubSubConnectionContext 构造函数

定义

客户端连接上下文包含 Web PubSub 协议下的 CloudEvents 标头。

public WebPubSubConnectionContext (Microsoft.Azure.WebPubSub.Common.WebPubSubEventType eventType, string eventName, string hub, string connectionId, string userId = default, string signature = default, string origin = default, System.Collections.Generic.IReadOnlyDictionary<string,BinaryData> connectionStates = default, System.Collections.Generic.IReadOnlyDictionary<string,string[]> headers = default);
new Microsoft.Azure.WebPubSub.Common.WebPubSubConnectionContext : Microsoft.Azure.WebPubSub.Common.WebPubSubEventType * string * string * string * string * string * string * System.Collections.Generic.IReadOnlyDictionary<string, BinaryData> * System.Collections.Generic.IReadOnlyDictionary<string, string[]> -> Microsoft.Azure.WebPubSub.Common.WebPubSubConnectionContext
Public Sub New (eventType As WebPubSubEventType, eventName As String, hub As String, connectionId As String, Optional userId As String = Nothing, Optional signature As String = Nothing, Optional origin As String = Nothing, Optional connectionStates As IReadOnlyDictionary(Of String, BinaryData) = Nothing, Optional headers As IReadOnlyDictionary(Of String, String()) = Nothing)

参数

eventType
WebPubSubEventType

事件类型。

eventName
String

事件名称。

hub
String

中心名称。

connectionId
String

连接 ID。

userId
String

用户 ID。

signature
String

连接的签名。

origin
String

事件的源。

connectionStates
IReadOnlyDictionary<String,BinaryData>

连接状态。

headers
IReadOnlyDictionary<String,String[]>

连接请求标头。

适用于