WCF calls Dispose()
on service implementations that implement IDisposable
.
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession,
ConcurrencyMode = ConcurrencyMode.Multiple)]
public class DataService : IDataService, IDisposable
{
public void Dispose()
{
}
...
...
}
Since I've found this useful on a number of occasions, I imagine it is of interest to others too ...
I haven't seen this documented anywhere, but then I haven't read everything either. :)