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

后端 未结 1 1577
我在风中等你
我在风中等你 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";
    
        /// 
        /// Gets or sets the  for CounterState.
        /// 
        /// 
        /// The accessor stores the turn count for the conversation.
        /// 
        public IStatePropertyAccessor CounterState { get; set; }
    

    0 讨论(0)
提交回复
热议问题