IServiceProviderContract 接口
定义
定义用于从组件中检索服务协定的机制。Defines a mechanism for retrieving a service contract from a component.
public interface class IServiceProviderContract : System::AddIn::Contract::IContract
public interface IServiceProviderContract : System.AddIn.Contract.IContract
type IServiceProviderContract = interface
interface IContract
Public Interface IServiceProviderContract
Implements IContract
- 实现
注解
IServiceProviderContract接口定义一个协定,该协定使组件能够获取由另一个组件定义的自定义服务。The IServiceProviderContract interface defines a contract that enables a component to obtain a custom service that is defined by another component. 实现的组件 IServiceProviderContract 称为服务提供程序。A component that implements IServiceProviderContract is known as a service provider. 服务提供程序实现 QueryService 方法以返回 IContract 实现服务的。Service providers implement the QueryService method to return an IContract that implements a service.
方法
| AcquireLifetimeToken() |
指定客户端在撤消此协定之前一直可以访问它。Specifies that the contract is accessible to a client until the client revokes the contract. (继承自 IContract) |
| GetRemoteHashCode() |
返回 IContract 的哈希代码。Returns a hash code for the IContract. (继承自 IContract) |
| QueryContract(String) |
返回由此协定实现的协定。Returns a contract that is implemented by this contract. (继承自 IContract) |
| QueryService(String, String) |
返回由此 IServiceProviderContract 实现的服务协定。Returns a service contract that is implemented by this IServiceProviderContract. |
| RemoteEquals(IContract) |
指示指定的协定是否与此 IContract 相等。Indicates whether the specified contract is equal to this IContract. (继承自 IContract) |
| RemoteToString() |
返回当前 IContract 的字符串表示形式。Returns a string representation of the current IContract. (继承自 IContract) |
| RevokeLifetimeToken(Int32) |
指定客户端不再能够访问该协定。Specifies that the contract is no longer accessible to a client. (继承自 IContract) |