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

Definitie

Hiermee stelt u de context in.

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

Parameters

context
IDictionary<String,String>

De IDictionary<TKey,TValue> sleutel/waardeparen met de naamruimte en de naam van de context die is ingesteld.

Voorbeelden

De volgende code laat zien hoe de context op de client kan worden ingesteld.

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

Van toepassing op