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 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應