語言

IContextManager.GetContext 方法

定義

了解上下文。

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)

傳回

鍵值的 與 IDictionary<TKey,TValue> 上下文的命名空間及名稱相配對。

範例

以下程式碼說明如何從用戶端的型別代理實例取得上下文。

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

適用於