/// <summary> /// Adds a discussion reference to the current person. /// </summary> /// <param name="discussion">The discussion state with a discussion reference to add.</param> /// <param name="options">The options to apply before executing the REST API call.</param> /// <returns> /// A <see cref="FamilyTreePersonState"/> instance containing the REST API response. /// </returns> public FamilyTreePersonState AddDiscussionReference(DiscussionState discussion, params IStateTransitionOption[] options) { DiscussionReference reference = new DiscussionReference(); reference.Resource = discussion.GetSelfUri(); return(AddDiscussionReference(reference, options)); }
protected virtual async Task PopulateStateObjects(WaterfallStepContext sc) { _discussionState = await StateHelper.RetrieveFromStateAsync <ConversationState, DiscussionState>(_serviceProvider, sc.Context); _discussionState.UpdateActivityFromId(sc.Context); _onboardingState = await StateHelper.RetrieveFromStateAsync <UserState, OnboardingState>(_serviceProvider, sc.Context, true); }
public static CommentState AsCommentState(this DiscussionState state) { switch (state) { case DiscussionState.NoActionNeeded: return(CommentState.NoActionNeeded); case DiscussionState.NeedsResolution: return(CommentState.NeedsResolution); case DiscussionState.GoodWork: return(CommentState.GoodWork); default: throw new ArgumentOutOfRangeException(nameof(state)); } }
/// <summary> /// Adds a discussion reference to the current person. /// </summary> /// <param name="discussion">The discussion state with a discussion reference to add.</param> /// <param name="options">The options to apply before executing the REST API call.</param> /// <returns> /// A <see cref="FamilyTreePersonState"/> instance containing the REST API response. /// </returns> public FamilyTreePersonState AddDiscussionReference(DiscussionState discussion, params IStateTransitionOption[] options) { DiscussionReference reference = new DiscussionReference(); reference.Resource = discussion.GetSelfUri(); return AddDiscussionReference(reference, options); }