I have this class
public class MyClient : IMyClient, IMyClientAsync,IDisposable
I am writing a wrapper that returns IMyClientAsync like this:
IMyClientAsync GetClient()
{
return new MyClient ();
}
But then anyone who is using this wrapper can't close the client in a using block like using(var client = MyWrapper.GetClient()){} since the information that object implements IDisposable is lost.
Is there any way to change it to be able to still close my client in a using block?