/// <summary> /// Dispose of resources used by the class. /// </summary> /// <param name="disposing">If the class is disposing managed resources.</param> private void Dispose(bool disposing) { if (disposedValue) { return; } if (disposing) { _darkSky.Dispose(); } disposedValue = true; }
/// <summary> /// Dispose of resources used by the class. /// </summary> /// <param name="disposing">If the class is disposing managed resources.</param> protected virtual void Dispose(bool disposing) { if (disposedValue) { return; } if (disposing) { _darkSky.Dispose(); } disposedValue = true; }
public void DisposeTest() { using var service = new DarkSkyService("ABCD"); service.Dispose(); }