Dela via


CompletionMessage Class

Definition

Represents an invocation that has completed. If there is an error then the invocation didn't complete successfully.

public ref class CompletionMessage : Microsoft::AspNetCore::SignalR::Protocol::HubInvocationMessage
public class CompletionMessage : Microsoft.AspNetCore.SignalR.Protocol.HubInvocationMessage
type CompletionMessage = class
    inherit HubInvocationMessage
Public Class CompletionMessage
Inherits HubInvocationMessage
Inheritance

Constructors

CompletionMessage(String, String, Object, Boolean)

Constructs a CompletionMessage.

Properties

Error

Optional error message if the invocation wasn't completed successfully. This must be null if there is a result.

HasResult

Specifies whether the completion contains a result.

Headers

Gets or sets a name/value collection of headers.

(Inherited from HubInvocationMessage)
InvocationId

Gets the invocation ID.

(Inherited from HubInvocationMessage)
Result

Optional result from the invocation. This must be null if there is an error. This can also be null if there wasn't a result from the method invocation.

Methods

Empty(String)

Constructs a CompletionMessage without an error or result. This means the invocation was successful but there is no return value.

ToString()

Returns a string that represents the current object.

WithError(String, String)

Constructs a CompletionMessage with an error.

WithResult(String, Object)

Constructs a CompletionMessage with a result.

Applies to