IContextManager.SetContext(IDictionary<String,String>) Метод

Определение

Задает контекст.

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

Параметры

context
IDictionary<String,String>

Объект IDictionary<TKey,TValue> пар «ключ/значение» с пространством имен и именем заданного контекста.

Примеры

Следующий код показывает, как можно задать контекст на клиенте.

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

Применяется к