Language

WebPubSubChatServiceClient.GetUserAsync Method

Definition

Overloads

Name Description
GetUserAsync(String, RequestContext)

[Protocol Method] Get a user's profile. The response is a polymorphic ChatUser (e.g. HumanChatUser) selected by the kind discriminator.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetUserAsync(String, CancellationToken)

Get a user's profile. The response is a polymorphic ChatUser (e.g. HumanChatUser) selected by the kind discriminator.

GetUserAsync(String, RequestContext)

Source:
WebPubSubChatServiceClient.cs

[Protocol Method] Get a user's profile. The response is a polymorphic ChatUser (e.g. HumanChatUser) selected by the kind discriminator.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetUserAsync(string userId, Azure.RequestContext context);
abstract member GetUserAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetUserAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetUserAsync (userId As String, context As RequestContext) As Task(Of Response)

Parameters

userId
String

User identifier.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

userId is null.

userId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetUserAsync(String, CancellationToken)

Source:
WebPubSubChatServiceClient.cs

Get a user's profile. The response is a polymorphic ChatUser (e.g. HumanChatUser) selected by the kind discriminator.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatUser>> GetUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetUserAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatUser>>
override this.GetUserAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Messaging.WebPubSub.Chat.WebPubSubChatUser>>
Public Overridable Function GetUserAsync (userId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of WebPubSubChatUser))

Parameters

userId
String

User identifier.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

userId is null.

userId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to