IActivityExtensions.TryGetChannelData<TypeT>(IActivity, TypeT) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
static member TryGetChannelData : Microsoft.Agents.Protocols.Primitives.IActivity * 'ypeT -> bool
<Extension()>
Public Function TryGetChannelData(Of TypeT) (activity As IActivity, ByRef instance As TypeT) As Boolean
- TypeT
The type of the object to return.
- 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.
true
if the operation succeeded; otherwise, false
.
Product | Versions |
---|---|
Microsoft 365 Agents SDK .NET | 1 |