SendActivity.Context Property
Definition
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.
Returns a dictionary that contains the context used for communication between the client and the service it is communicating with, including such things as identification for correlation.
public:
property System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ Context { System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ get(); void set(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Collections.Generic.IDictionary<string,string> Context { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.Context : System.Collections.Generic.IDictionary<string, string> with get, set
Public Property Context As IDictionary(Of String, String)
Property Value
A dictionary-based collection that contains XmlQualifiedName keys and their associated String values.
- Attributes
Examples
The following example shows how to access the Context
property. This example was adapted from the CalculatorClient
SDK sample.
static public void ApplyContext(SendActivity activity, IDictionary<string, string> context)
{
if (activity.ExecutionStatus == ActivityExecutionStatus.Initialized)
{
activity.Context = context;
}
}
Remarks
Context information is used for communication between the client and the service it is communicating with and includes such things as identification for correlation.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈