public void Dispose()
{
Dispose(true);
// This object will be cleaned up by the Dispose method.
// Therefore, you should call GC.SupressFinalize to
// take this object off the finalization queue
// and prevent finalization code for this object
// from executing a second time.
GC.SuppressFinalize(this);
}
WebSource::Dispose ( bool disposing ) : void |
public void WebSourceDisposeExpectedDisposesAndNullsClient() { var source = new WebSource { Client = new WebClient() }; Assert.IsNotNull(source.Client); source.Dispose(); Assert.IsNull(source.Client); }