Example #1
0
        public virtual void DeleteLanguage(Dil language)
        {
            if (language == null)
            {
                throw new ArgumentNullException(nameof(language));
            }

            if (language is IÖnbellekİçinVarlık)
            {
                throw new ArgumentException("Cacheable entities are not supported by Entity Framework");
            }

            if (_localizationSettings.DefaultAdminLanguageId == language.Id)
            {
                foreach (var activeLanguage in GetAllLanguages())
                {
                    if (activeLanguage.Id != language.Id)
                    {
                        _localizationSettings.DefaultAdminLanguageId = activeLanguage.Id;
                        _settingService.AyarKaydet(_localizationSettings);
                        break;
                    }
                }
            }

            _languageRepository.Sil(language);
            _cacheManager.KalıpİleSil(LANGUAGES_PATTERN_KEY);
            _eventPublisher.OlaySilindi(language);
        }
Example #2
0
        public virtual void DeleteLocalizedProperty(LocalizedProperty localizedProperty)
        {
            if (localizedProperty == null)
            {
                throw new ArgumentNullException(nameof(localizedProperty));
            }

            _localizedPropertyRepository.Sil(localizedProperty);

            //cache
            _cacheManager.KalıpİleSil(LOCALIZEDPROPERTY_PATTERN_KEY);
        }
        protected virtual async Task ResimThumbSilAsync(Resim resim)
        {
            //create a string containing the blob name prefix
            var prefix = $"{resim.Id:0000000}";

            BlobContinuationToken continuationToken = null;

            do
            {
                var resultSegment = await _container.ListBlobsSegmentedAsync(prefix, true, BlobListingDetails.All, null, continuationToken, null, null);

                //delete files in result segment
                await Task.WhenAll(resultSegment.Results.Select(blobItem => ((CloudBlockBlob)blobItem).DeleteAsync()));

                //get the continuation token.
                continuationToken = resultSegment.ContinuationToken;
            }while (continuationToken != null);

            _önbellekYönetici.KalıpİleSil(THUMBS_PATTERN_KEY);
        }
        protected virtual void InsertLocaleStringResources(IList <LocaleStringResource> resources)
        {
            if (resources == null)
            {
                throw new ArgumentNullException(nameof(resources));
            }

            _lsrRepository.Ekle(resources);
            _cacheManager.KalıpİleSil(LOCALSTRINGRESOURCES_PATTERN_KEY);
            foreach (var resource in resources)
            {
                _eventPublisher.OlayEklendi(resource);
            }
        }
 //languages
 public void Olay(OlayEklendi <Dil> eventMessage)
 {
     //clear all localizable models
     _cacheManager.KalıpİleSil(SEARCH_CATEGORIES_PATTERN_KEY);
     _cacheManager.KalıpİleSil(MANUFACTURER_NAVIGATION_PATTERN_KEY);
     _cacheManager.KalıpİleSil(PRODUCT_SPECS_PATTERN_KEY);
     _cacheManager.KalıpİleSil(SPECS_FILTER_PATTERN_KEY);
     _cacheManager.KalıpİleSil(TOPIC_PATTERN_KEY);
     _cacheManager.KalıpİleSil(PRODUCT_BREADCRUMB_PATTERN_KEY);
     _cacheManager.KalıpİleSil(CATEGORY_ALL_PATTERN_KEY);
     _cacheManager.KalıpİleSil(PRODUCT_MANUFACTURERS_PATTERN_KEY);
     _cacheManager.KalıpİleSil(STATEPROVINCES_PATTERN_KEY);
     _cacheManager.KalıpİleSil(AVAILABLE_LANGUAGES_PATTERN_KEY);
     _cacheManager.KalıpİleSil(AVAILABLE_CURRENCIES_PATTERN_KEY);
 }
Example #6
0
 public void Olay(OlayEklendi <Ayarlar> eventMessage)
 {
     _cacheManager.KalıpİleSil(PICTURE_URL_PATTERN_KEY);
 }