Sdílet prostřednictvím


SendActivity.Context Vlastnost

Definice

Vrátí slovník, který obsahuje kontext používaný pro komunikaci mezi klientem a službou, se kterou komunikuje, včetně takových věcí, jako je identifikace korelace.

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)

Hodnota vlastnosti

IDictionary<String,String>

Kolekce založená na slovníku, která obsahuje XmlQualifiedName klíče a jejich přidružené String hodnoty.

Atributy

Příklady

Následující příklad ukazuje, jak získat přístup k Context vlastnosti. Tento příklad byl upraven z ukázky CalculatorClient sady SDK.

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

Poznámky

Kontextové informace se používají ke komunikaci mezi klientem a službou, se kterými komunikuje, a zahrnují například identifikaci korelace.

Platí pro