IActivityExtensions.TryGetChannelData<TypeT>(IActivity, TypeT) Method

Definition

Gets the channel data for this activity as a strongly-typed object. A return value indicates whether the operation succeeded.

C#
public static bool TryGetChannelData<TypeT>(this Microsoft.Agents.Protocols.Primitives.IActivity activity, out TypeT instance);

Type Parameters

TypeT

The type of the object to return.

Parameters

activity
IActivity
instance
TypeT

When this method returns, contains the strongly-typed object if the operation succeeded, or the type's default value if the operation failed.

Returns

true if the operation succeeded; otherwise, false.

Applies to

Product Versions
Microsoft 365 Agents SDK .NET 1

See also