Пример #1
0
        /// <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;
        }
Пример #2
0
        /// <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;
        }
Пример #3
0
 public void DisposeTest()
 {
     using var service = new DarkSkyService("ABCD");
     service.Dispose();
 }