如果Dispose()方法声明不可见/声明,System.ServiceModel.ClientBase抽象类如何实现IDisposable接口?
如果我尝试做同样的事我得到一个错误,无法编译
abstract class ATeste : IDisposable
{
}
Run Code Online (Sandbox Code Playgroud)
'ATeste'没有实现接口成员'System.IDisposable.Dispose()'
我正在使用VS 2010和Framework 4.0.
检查ClientBase声明:
// Summary:
// Provides the base implementation used to create Windows Communication Foundation
// (WCF) client objects that can call services.
//
// Type parameters:
// TChannel:
// The channel to be used to connect to the service.
public abstract class ClientBase<TChannel> : ICommunicationObject, IDisposable where TChannel : class
{
// Summary:
// Initializes a new instance of the System.ServiceModel.ClientBase<TChannel>
// class using the default target …Run Code Online (Sandbox Code Playgroud)