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

適用於