Share via


IContextManager.SetContext(IDictionary<String,String>) メソッド

定義

コンテキストを設定します。

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

パラメーター

context
IDictionary<String,String>

名前空間と設定済みのコンテキスト名が含まれたキーと値のペアの IDictionary<TKey,TValue>

次のコードは、クライアントでコンテキストを設定する方法を示しています。

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

適用対象