/// <summary> /// Set the property value. /// </summary> /// <param name="turnContext">turn context.</param> /// <param name="value">value.</param> /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> public Task SetAsync(ITurnContext turnContext, T value) { return(_botState.SetPropertyValueAsync(turnContext, Name, value)); }
/// <summary> /// Set the property value. /// </summary> /// <param name="turnContext">turn context.</param> /// <param name="value">value.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> public async Task SetAsync(ITurnContext turnContext, T value, CancellationToken cancellationToken) { await _botState.LoadAsync(turnContext, false, cancellationToken).ConfigureAwait(false); await _botState.SetPropertyValueAsync(turnContext, Name, value, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Set the property value. /// </summary> /// <param name="turnContext">turn context.</param> /// <param name="value">value.</param> /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> public async Task SetAsync(ITurnContext turnContext, T value) { await _botState.LoadAsync(turnContext).ConfigureAwait(false); await _botState.SetPropertyValueAsync(turnContext, Name, value).ConfigureAwait(false); }