Share via


IContextManager.GetContext Método

Definição

Obtém o contexto.

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)

Retornos

O IDictionary<TKey,TValue> de pares chave/valor com o namespace e o nome do contexto.

Exemplos

O código a seguir mostra como o contexto pode ser obtido de uma instância de proxy tipada no cliente.

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

Aplica-se a