Share via


SendActivity.Context 屬性

定義

傳回一個字典,內含用戶端與通訊的服務之間的通訊所使用文字,包括相互關聯識別。

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)

屬性值

IDictionary<String,String>

以字典為基礎的集合,內含 XmlQualifiedName 關鍵字及其關聯的 String 值。

屬性

範例

下列範例將示範如何存取 Context 屬性。 這個範例是改自 CalculatorClient SDK 範例。

static public void ApplyContext(SendActivity activity, IDictionary<string, string> context)
{
    if (activity.ExecutionStatus == ActivityExecutionStatus.Initialized)
    {
        activity.Context = context;
    }
}

備註

內容資訊,是用戶端及其所通訊的服務之間所使用的通訊,包括相互關聯的識別。

適用於