Conversation Class

Definition

Represents a record containing a conversation reference and associated claims for a conversation.

public class Conversation
type Conversation = class
Public Class Conversation
Inheritance
Conversation

Remarks

This class is typically used to persist or transfer conversation context and identity claims between different components or services in an agent application. The claims are extracted from a provided identity and can be used for authentication or authorization scenarios. The conversation reference provides the necessary information to resume or continue a conversation thread.

See ConversationBuilder to ease creation of an instance of this class.

Constructors

Name Description
Conversation(ClaimsIdentity, ConversationReference)

Initializes a new instance of the Conversation class using the specified identity and conversation reference.

Conversation(IDictionary<String,String>, ConversationReference)

Initializes a new instance of the Conversation class with the specified claims and conversation reference.

Conversation(ITurnContext)

Initializes a new instance of the Conversation class using the specified turn context.

Properties

Name Description
Identity

Gets a claims-based identity constructed from the current set of claims.

Reference

Gets or sets the reference information for the conversation associated with this instance.

Methods

Name Description
ClaimsFromIdentity(ClaimsIdentity)

Extracts a dictionary of selected claim types and their values from the specified identity.

IdentityFromClaims(IDictionary<String,String>)

Creates a new ClaimsIdentity from the specified collection of claim type and value pairs.

ToJson()

Serializes the current object to its JSON representation.

Extension Methods

Name Description
Validate(Conversation, Boolean)

Validates a Conversation instance to ensure all required properties are valid.

Applies to