IContextManager.SetContext(IDictionary<String,String>) Método

Definición

Establece el contexto.

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

Parámetros

context
IDictionary<String,String>

La interfaz IDictionary<TKey,TValue> de pares clave-valor con el espacio de nombres y el nombre del contexto que se establece.

Ejemplos

El siguiente código muestra cómo puede establecerse el contexto en el cliente.

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

Se aplica a