Supposing I start off with the synchronous version:
using(var svc = new ServiceObject()) {
var result = svc.DoSomething();
// do stuff with result
}
I wind up with
var svc = new ServiceObject();
svc.BeginDoSomething(async => {
var result = svc.EndDoSomething(async);
svc.Dispose();
// do stuff with result
},null);
1) Is this the correct place to call Dispose()?
2) is there a way to use using() ?