Langue

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>

Paires IDictionary<TKey,TValue> clé/valeur avec l’espace de noms et le nom du contexte défini.

Exemples

Le code suivant montre comment 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 à