IContextManager.SetContext(IDictionary<String,String>) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
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);