Пример #1
0
        /// <summary>
        /// On Dispose
        /// </summary>
        protected override void OnDispose()
        {
            _collectionDisposableObjects.Dispose();

            foreach (var anonymous in _anonymousDisposableObjects.Values)
            {
                anonymous?.Dispose();
            }

            InternalClearDisposableActions();
        }
Пример #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _collectionDisposableObjects.Dispose();

                foreach (var anonymous in _anonymousDisposableObjects.Values)
                {
                    anonymous?.Dispose();
                }

                InternalClearDisposableActions();
            }

            _disposed = true;
        }
Пример #3
0
 /// <summary>
 /// On Dispose
 /// </summary>
 protected override void OnDispose() => _collectionDisposableObjects.Dispose();
Пример #4
0
 public void Dispose()
 {
     _collectionDisposableObjects.Dispose();
 }