private static void DeleteBlobs(IEnumerable <ContentReference> contentReferences, IContentRepository repo, StringBuilder sb, IBlobFactory blobFactory) { foreach (ContentReference reference in contentReferences) { ImageFile file = null; try { file = repo.Get <ImageFile>(reference); } catch { } if (file != null) { IContentVersionRepository versionRepo = ServiceLocator.Current.GetInstance <IContentVersionRepository>(); IEnumerable <ContentVersion> versions = versionRepo.List(file.ContentLink); foreach (ContentVersion version in versions) { var versionOfFile = repo.Get <ImageFile>(version.ContentLink); if (versionOfFile != null) { DeleteBlobInstances(sb, blobFactory, versionOfFile); } } sb.AppendFormat("{0}<br>", file.Name); // Delete old versions DeleteOldVersions(file, sb); } } }
public ExtendedContentModelMapper(IUrlResolver urlResolver, IContentModelMapper defaultContentModelMapper, ServiceAccessor <HttpContextBase> httpContextAccessor, IContentVersionRepository versionRepository) { _urlResolver = urlResolver; _defaultContentModelMapper = defaultContentModelMapper; _httpContextAccessor = httpContextAccessor; _versionRepository = versionRepository; }
public HomePageController() { _contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>(); _contentVersionRepository = ServiceLocator.Current.GetInstance <IContentVersionRepository>(); _contentSoftLinkRepository = ServiceLocator.Current.GetInstance <IContentSoftLinkRepository>(); }
public ProjectsAdminController(IProjectResolver projectResolver, ProjectRepository projectRepository, IContentVersionRepository contentVersionRepository, IContentLoader contentLoader) { this.projectResolver = projectResolver; this.projectRepository = projectRepository; this.contentVersionRepository = contentVersionRepository; this.contentLoader = contentLoader; }
public VerndalePublishController(IContentRepository contentRepository, IContentLoader contentLoader, IContentVersionRepository contentVersionRepository) { ContentRepository = contentRepository; ContentLoader = contentLoader; ContentVersionRepository = contentVersionRepository; }
public void SetUp() { _stubContentLoader = Substitute.For <IContentLoader>(); _stubContentRepository = Substitute.For <IContentRepository>(); _stubContentVersionRepository = Substitute.For <IContentVersionRepository>(); _propertyService = new PropertyService(_stubContentLoader, _stubContentRepository, _stubContentVersionRepository); }
public LatestContentResolver(IContentStoreModelCreator contentStoreModelCreator, IContentVersionRepository contentVersionRepository, LanguageResolver languageResolver, IContentLoader contentLoader) { _contentStoreModelCreator = contentStoreModelCreator; _contentVersionRepository = contentVersionRepository; _languageResolver = languageResolver; _contentLoader = contentLoader; }
public DefaultPropertyIndicatorHelper(IContentRepository contentRepository, ContentAssetHelper contentAssetHelper , IContentTypeRepository contentTypeRepository, IContentVersionRepository contentVersionRepository) { _contentRepository = contentRepository; _contentAssetHelper = contentAssetHelper; _contentTypeRepository = contentTypeRepository; _contentVersionRepository = contentVersionRepository; }
public VirtualTemplateVersionRepository(IContentVersionRepository contentVersionRepo, LocalizationService localization, IContentRepository contentRepo, ITemplateKeyConverter keyConverter) { _contentVersionRepo = contentVersionRepo; _localization = localization; _contentRepo = contentRepo; _keyConverter = keyConverter; }
public DraftContentAreaLoader(IContentAreaLoader defaultContentAreaLoader, IContentLoader contentLoader, LanguageResolver languageResolver, IContentVersionRepository contentVersionRepository ) { _defaultContentAreaLoader = defaultContentAreaLoader; _contentLoader = contentLoader; _languageResolver = languageResolver; _contentVersionRepository = contentVersionRepository; }
public LatestContentResolver(IContentStoreModelCreator contentStoreModelCreator, IContentVersionRepository contentVersionRepository, LanguageResolver languageResolver, IContentLoader contentLoader, ProjectContentResolver projectContentResolver, CurrentProject currentProject) { _contentStoreModelCreator = contentStoreModelCreator; _contentVersionRepository = contentVersionRepository; _languageResolver = languageResolver; _contentLoader = contentLoader; _projectContentResolver = projectContentResolver; _currentProject = currentProject; }
public ContentCompareStore(IContentVersionRepository contentVersionRepository, LanguageResolver languageResolver, ContentSoftLinkIndexer contentSoftLinkIndexer, IContentLoader contentLoader) { _contentVersionRepository = contentVersionRepository; _languageResolver = languageResolver; _contentSoftLinkIndexer = contentSoftLinkIndexer; _contentLoader = contentLoader; }
public EpiPageModel(IEpiServerInitialize epi, IActionDescriptorCollectionProvider actionDescriptorCollectionProvider) { contentLoader = epi.GetInstance <IContentLoader>(); contentVersionRepository = epi.GetInstance <IContentVersionRepository>(); var pages = new List <T>(); _actionDescriptorCollectionProvider = actionDescriptorCollectionProvider; //CurrentPage = pages.FirstOrDefault(x => x.URLSegment == ) }
public void Initialize(InitializationEngine context) { this._tagService = ServiceLocator.Current.GetInstance<ITagService>(); this._contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>(); this._contentRepository = ServiceLocator.Current.GetInstance<IContentRepository>(); this._contentVersionRepository = ServiceLocator.Current.GetInstance<IContentVersionRepository>(); this._contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); this._contentEvents.PublishedContent += OnPublishedContent; }
public FacetPartialRoute(Func<ContentReference> routeStartingPoint, CatalogContentBase commerceRoot, bool supportSeoUri, IContentLoader contentLoader, IRoutingSegmentLoader routingSegmentLoader, IContentVersionRepository contentVersionRepository, IUrlSegmentRouter urlSegmentRouter, IContentLanguageSettingsHandler contentLanguageSettingsHandler, FacetUrlService facetUrlCreator) : base( routeStartingPoint, commerceRoot, supportSeoUri, contentLoader, routingSegmentLoader, contentVersionRepository, urlSegmentRouter, contentLanguageSettingsHandler) { _facetUrlCreator = facetUrlCreator; }
public CategoryExportService( ReferenceConverter referenceConverter, IContentLoader contentLoader, IContentVersionRepository contentVersionRepository, L10nStringFactory l10nStringFactory) { _referenceConverter = referenceConverter; _contentLoader = contentLoader; _contentVersionRepository = contentVersionRepository; _l10nStringFactory = l10nStringFactory; }
public FacetPartialRoute(Func <ContentReference> routeStartingPoint, CatalogContentBase commerceRoot, bool supportSeoUri, IContentLoader contentLoader, IRoutingSegmentLoader routingSegmentLoader, IContentVersionRepository contentVersionRepository, IUrlSegmentRouter urlSegmentRouter, IContentLanguageSettingsHandler contentLanguageSettingsHandler, FacetUrlService facetUrlCreator) : base( routeStartingPoint, commerceRoot, supportSeoUri, contentLoader, routingSegmentLoader, contentVersionRepository, urlSegmentRouter, contentLanguageSettingsHandler) { _facetUrlCreator = facetUrlCreator; }
public AzureAdSecurityEpiserverProvider(IContentRepository contentRepository, IAzureAdSecuritySettingsProvider providerFallback, IContentEvents contentEvents, IContentVersionRepository contentVersionRepository, ICustomVirtualRolesWatcher rolesWatcher) { ContentRepository = contentRepository; ProviderFallback = providerFallback; ContentEvents = contentEvents; ContentVersionRepository = contentVersionRepository; RolesWatcher = rolesWatcher; }
public CategoryExportService( ReferenceConverter referenceConverter, IContentLoader contentLoader, IContentVersionRepository contentVersionRepository, L10nStringFactory l10nStringFactory) { _configuration = KachingConfiguration.Instance; _referenceConverter = referenceConverter; _contentLoader = contentLoader; _contentVersionRepository = contentVersionRepository; _l10nStringFactory = l10nStringFactory; }
private static void DeleteOldVersions(ImageFile file, StringBuilder sb) { IContentVersionRepository versionRepo = ServiceLocator.Current.GetInstance <IContentVersionRepository>(); IEnumerable <ContentVersion> versions = versionRepo.List(file.ContentLink); foreach (ContentVersion version in versions) { if (version.Status != VersionStatus.Published) { sb.AppendFormat("Deleting version: {0}", version.ContentLink); versionRepo.Delete(version.ContentLink); } } }
public ReviewsContentLoader(IContentLoader contentLoader, IContentLanguageAccessor languageAccessor, ProjectContentResolver projectContentResolver, IContentVersionRepository contentVersionRepository, LanguageResolver languageResolver, IContentProviderManager contentProviderManager, IContentChildrenSorter childrenSorter) { _contentLoader = contentLoader; _languageAccessor = languageAccessor; _projectContentResolver = projectContentResolver; _contentVersionRepository = contentVersionRepository; _languageResolver = languageResolver; _contentProviderManager = contentProviderManager; _childrenSorter = childrenSorter; }
public CreateModel( IContentRepository contentRepository, IContentVersionRepository contentVersionRepository, IMapper mapper, EditorReflectionService editorReflectionService) { _contentRepository = contentRepository; _contentVersionRepository = contentVersionRepository; _mapper = mapper; _editorReflectionService = editorReflectionService; _typeMappings = ServiceLocator.Current.GetInstance <ICachedContentTypeControllerMappings>(); var httpContext = ServiceLocator.Current.GetInstance <IHttpContextAccessor>().HttpContext; httpContext.Items.Add("Area", "EZMS"); }
public HeaderViewModelFactory(LocalizationService localizationService, IUrlResolver urlResolver, IContentCacheKeyCreator contentCacheKeyCreator, IContentLoader contentLoader, IDatabaseMode databaseMode, ISettingsService settingsService, IContentVersionRepository contentVersionRepository) { _localizationService = localizationService; _urlResolver = urlResolver; _contentCacheKeyCreator = contentCacheKeyCreator; _contentLoader = contentLoader; _databaseMode = databaseMode; _settingsService = settingsService; _contentVersionRepository = contentVersionRepository; }
public ProductExportService( IAssociationRepository associationRepository, GroupDefinitionRepository <AssociationGroupDefinition> associationGroupRepository, ReferenceConverter referenceConverter, IContentLoader contentLoader, IContentVersionRepository contentVersionRepository, ProductFactory productFactory) { _associationRepository = associationRepository; _associationGroupRepository = associationGroupRepository; _referenceConverter = referenceConverter; _configuration = KachingConfiguration.Instance; _contentLoader = contentLoader; _contentVersionRepository = contentVersionRepository; _productFactory = productFactory; }
public SettingsService( IContentVersionRepository contentVersionRepository, IContentRepository contentRepository, ContentRootService contentRootService, ITypeScannerLookup typeScannerLookup, IContentTypeRepository contentTypeRepository, IContentEvents contentEvents, ISiteDefinitionEvents siteDefinitionEvents, ISiteDefinitionRepository siteDefinitionRepository, ISiteDefinitionResolver siteDefinitionResolver, ServiceAccessor <HttpContextBase> httpContext) { _contentVersionRepository = contentVersionRepository; _contentRepository = contentRepository; _contentRootService = contentRootService; _typeScannerLookup = typeScannerLookup; _contentTypeRepository = contentTypeRepository; _contentEvents = contentEvents; _siteDefinitionEvents = siteDefinitionEvents; _siteDefinitionRepository = siteDefinitionRepository; _siteDefinitionResolver = siteDefinitionResolver; _httpContext = httpContext; }
public DefaultDataExporterInterceptor(IDataExporter defaultDataExporter , ITransferExportOptionsEx transferExportOptionsEx , IContentVersionRepository contentVersionRepository , IRawContentRetriever rawContentRetriever , IContentLoader contentLoader , IPropertyExporter propertyExporter , IDataExportEventsRaiser eventRegister , IDataExportEvents exportEvents , IContentCacheKeyCreator contentCacheKeyCreator , ISynchronizedObjectInstanceCache cacheInstance , IContentRepository contentRepository , IPermanentLinkMapper permanentLinkMapper , IContentTypeRepository contentTypeRepository , IContentProviderManager contentProviderManager , ContentTypeAvailabilityService contentTypeAvailabilityService , IAvailableSettingsRepository availableSettingsRepository , IContentExporter contentExporter , PropertyCategoryTransform categoryTransform , ContentRootRepository contentRootRepository , ISiteDefinitionRepository siteDefinitionRepository , IMimeTypeResolver mimeTypeResolver) : base(eventRegister, exportEvents, contentCacheKeyCreator , cacheInstance, contentRepository , permanentLinkMapper, contentTypeRepository , contentProviderManager, contentTypeAvailabilityService , availableSettingsRepository, contentExporter , categoryTransform, contentRootRepository , siteDefinitionRepository, mimeTypeResolver) { _defaultDataExporter = defaultDataExporter; _transferExportOptionsEx = transferExportOptionsEx; _contentVersionRepository = contentVersionRepository; _contentExporter = contentExporter; _rawContentRetiever = rawContentRetriever; _contentLoader = contentLoader; _propertyExporter = propertyExporter; }
public LatestNewsBlockModelMapper(IContentTypeRepository contentTypeRepository, ReflectionService reflectionService, IContentModelReferenceConverter contentModelService, IPropertyConverterResolver propertyConverterResolver, IContentVersionRepository contentVersionRepository, ContentLoaderService contentLoaderService, UrlResolverService urlResolverService, ContentApiConfiguration apiConfig, IUrlResolver urlResolver, IContentLoader contentLoader) : base(contentTypeRepository, reflectionService, contentModelService, contentVersionRepository, contentLoaderService, urlResolverService, apiConfig, propertyConverterResolver) { _urlResolver = urlResolver; _contentLoader = contentLoader; }
public PropertyService(IContentLoader contentLoader, IContentRepository contentRepository, IContentVersionRepository contentVersionRepository) { _contentLoader = contentLoader; _contentRepository = contentRepository; _contentVersionRepository = contentVersionRepository; }
public StartPageVersionGenerator(IContentRepository contentRepository, IContentVersionRepository contentVersionRepository) { _contentRepository = contentRepository; }
public DefaultContentLoader(IContentRepository repository, IContentVersionRepository contentVersionRepository, ILogger <DefaultContentLoader> logger) { _repository = repository; _contentVersionRepository = contentVersionRepository; _logger = logger; }
public ContentVersionGenerator(IContentRepository contentRepository, IContentVersionRepository contentVersionRepository) { _contentRepository = contentRepository; _contentVersionRepository = contentVersionRepository; }