IContract.QueryContract(String) 方法

定义

返回由此协定实现的协定。

public:
 System::AddIn::Contract::IContract ^ QueryContract(System::String ^ contractIdentifier);
public System.AddIn.Contract.IContract QueryContract(string contractIdentifier);
abstract member QueryContract : string -> System.AddIn.Contract.IContract
Public Function QueryContract (contractIdentifier As String) As IContract

参数

contractIdentifier
String

一个字符串,标识正在请求的协定。

返回

IContract 个表示客户端正在从当前协定请求的协定; null 如果当前协定不支持所请求的协定。

注解

该方法 QueryContract 使对象能够 IContract 公开其他协定。 QueryContract 用于与 IUnknown.QueryInterface COM 中方法类似的用途。

用于标识协定的字符串的格式由 IContract 实现定义。 建议使用 AssemblyQualifiedName 正在查询的协定。

适用于