CloseMessage 构造函数

定义

重载

CloseMessage(String)

使用可选错误消息初始化 类的新实例 CloseMessage ,并将其 AllowReconnect 设置为 false

CloseMessage(String, Boolean)

使用可选错误消息初始化 类的新实例 CloseMessage ,并 Boolean 指示启用自动重新连接的客户端在收到消息时是否应尝试重新连接。

CloseMessage(String)

Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs

使用可选错误消息初始化 类的新实例 CloseMessage ,并将其 AllowReconnect 设置为 false

public:
 CloseMessage(System::String ^ error);
public CloseMessage (string error);
public CloseMessage (string? error);
new Microsoft.AspNetCore.SignalR.Protocol.CloseMessage : string -> Microsoft.AspNetCore.SignalR.Protocol.CloseMessage
Public Sub New (error As String)

参数

error
String

可选错误消息。

适用于

CloseMessage(String, Boolean)

Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs
Source:
CloseMessage.cs

使用可选错误消息初始化 类的新实例 CloseMessage ,并 Boolean 指示启用自动重新连接的客户端在收到消息时是否应尝试重新连接。

public:
 CloseMessage(System::String ^ error, bool allowReconnect);
public CloseMessage (string error, bool allowReconnect);
public CloseMessage (string? error, bool allowReconnect);
new Microsoft.AspNetCore.SignalR.Protocol.CloseMessage : string * bool -> Microsoft.AspNetCore.SignalR.Protocol.CloseMessage
Public Sub New (error As String, allowReconnect As Boolean)

参数

error
String

可选错误消息。

allowReconnect
Boolean

true如果启用了自动重新连接的客户端应在收到 CloseMessage后尝试重新连接; false如果客户端不应尝试重新连接,则是否启用自动重新连接。

适用于