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

IMessageSession.SetStateAsync(Byte[]) Method

Definition

Set a custom state on the session which can be later retrieved using GetStateAsync()

public System.Threading.Tasks.Task SetStateAsync(byte[] sessionState);
abstract member SetStateAsync : byte[] -> System.Threading.Tasks.Task
Public Function SetStateAsync (sessionState As Byte()) As Task

Parameters

sessionState
Byte[]

A byte array of session state

Returns

Remarks

This state is stored on Service Bus forever unless you set an empty state on it.

Applies to