how to pass value from one WaterfallDialog to another WaterfallDialog in ComponentDialog

后端 未结 1 1562
我在风中等你
我在风中等你 2021-01-23 07:10

bot framework v4

I have two WaterfallDialogs in ComponentDialog.

I could store value like below in WaterfallDialogs

step.value         


        
相关标签:
1条回答
  • 2021-01-23 07:48

    You need to use the State to store the intermediate values that you will need in any of the parent or child dialogs. In version 4 you can do that using the BotAccessors something on below lines

     public static string CounterStateName { get; } = $"{nameof(BotAccessors)}.CounterState";
    
        /// <summary>
        /// Gets or sets the <see cref="IStatePropertyAccessor{T}"/> for CounterState.
        /// </summary>
        /// <value>
        /// The accessor stores the turn count for the conversation.
        /// </value>
        public IStatePropertyAccessor<CounterState> CounterState { get; set; }
    
    0 讨论(0)
提交回复
热议问题