Share via


IContextManager.GetContext Méthode

Définition

Obtient le contexte.

public:
 System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ GetContext();
public System.Collections.Generic.IDictionary<string,string> GetContext ();
abstract member GetContext : unit -> System.Collections.Generic.IDictionary<string, string>
Public Function GetContext () As IDictionary(Of String, String)

Retours

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

Exemples

Le code suivant illustre l'obtention de contexte à partir d'une instance de proxy typée sur le client.

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

S’applique à