Esempio n. 1
0
        void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (_disposed)
            {
                throw new ObjectDisposedException(nameof(DataScope));
            }

            if (_servicesDisabled)
            {
                EnableServices();
            }

            if (_dataScopePushed)
            {
                DataScopeManager.PopDataScope();
            }

            if (_cultureInfoPushed)
            {
                LocalizationScopeManager.PopLocalizationScope();
            }

            if (_dataServicePushed)
            {
                DataServiceScopeManager.PopDataServiceScope();
            }

            _disposed = true;
        }
Esempio n. 2
0
        /// <exclude />
        public void Dispose()
        {
            if (_dataScopePushed)
            {
                DataScopeManager.PopDataScope();
            }

            if (_cultureInfoPushed)
            {
                LocalizationScopeManager.PopLocalizationScope();
            }
        }