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

Définition

Définit le contexte.

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

Paramètres

context
IDictionary<String,String>

IDictionary<TKey,TValue> de paires clé/valeur contenant l'espace de noms et le nom du contexte défini.

Exemples

Le code suivant illustre la façon dont le contexte peut être défini sur le client.

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

S’applique à