IProfferServiceContract 接口
定义
使客户端能够为在其上实现协定的组件提供自定义服务。Enables clients to provide custom services to components on which the contract is implemented.
public interface class IProfferServiceContract : System::AddIn::Contract::IContract
public interface IProfferServiceContract : System.AddIn.Contract.IContract
type IProfferServiceContract = interface
interface IContract
Public Interface IProfferServiceContract
Implements IContract
- 实现
注解
组件实现 IProfferServiceContract ,使客户端能够向组件提供服务。A component implements IProfferServiceContract to enable clients to offer services to the component. 向组件提供服务后,该组件的其他客户端可以访问该服务。After a service has been offered to a component, other clients of the component can access the service. 组件通常 IProfferServiceContract 在其实现的相同类型上实现 IServiceProviderContract 。Components typically implement IProfferServiceContract on the same type on which they implement IServiceProviderContract.
客户端使用 ProfferService 方法将添加 IServiceProviderContract 到组件提供的服务提供程序集。Clients use the ProfferService method to add an IServiceProviderContract to the set of service providers offered by a component. 客户端使用 RevokeService 方法 IServiceProviderContract 从组件提供的服务提供程序集中删除。Clients use the RevokeService method to remove an IServiceProviderContract from the set of service providers offered by a component.
方法
| 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) |
| ProfferService(String, IServiceProviderContract) |
向组件的客户端可访问的服务组添加服务。Adds a service to the set of services that can be accessed by clients of a component. |
| QueryContract(String) |
返回由此协定实现的协定。Returns a contract that is implemented by this contract. (继承自 IContract) |
| 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) |
| RevokeService(String) |
从组件提供的服务组中删除服务。Removes a service from the set of services offered by a component. |