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

Definition

Anger kontexten.

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))

Parametrar

context
IDictionary<String,String>

Nyckel IDictionary<TKey,TValue> /värde-par med namnområdet och namnet på kontexten som har angetts.

Exempel

Följande kod visar hur kontexten kan anges på klienten.

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

Gäller för