IContextManager.SetContext(IDictionary<String,String>) Methode

Definition

Legt den Kontext fest.

public:
 void SetContext(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ context);
public void SetContext(System.Collections.Generic.IDictionary<string,string> context);
abstract member SetContext : System.Collections.Generic.IDictionary<string, string> -> unit
Public Sub SetContext (context As IDictionary(Of String, String))

Parameter

context
IDictionary<String,String>

Die IDictionary<TKey,TValue> Schlüssel-Wert-Paare mit dem Namespace und dem Namen des festgelegten Kontexts.

Beispiele

Der folgende Code zeigt, wie der Kontext auf dem Client festgelegt werden kann.

IDictionary<string, string> context;
CalculatorProxy proxy;
IContextManager cm = proxy.InnerChannel.GetProperty<IContextManager>();
if (cm != null)
    cm.SetContext(context);

Gilt für: