예제 #1
0
        public void Initialize(InitializationEngine context)
        {
            _contentRootService        = ServiceLocator.Current.GetInstance <ContentRootService>();
            _contentSecurityRepository = ServiceLocator.Current.GetInstance <IContentSecurityRepository>();

            InitializeGoogleContactsComponent(context);
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="TaxonomyPartialRouter{TForPageType, TRootPageType}"/> class.
        /// </summary>
        /// <param name="basePathRoot">The function to use when evaluating the root for the router.</param>
        public TaxonomyPartialRouter(Func <TForPageType, ContentReference> basePathRoot)
        {
            this.getBasePathRoot = basePathRoot;

            this.contentRootService     = ServiceLocator.Current.GetInstance <ContentRootService>();
            this.urlResolver            = ServiceLocator.Current.GetInstance <UrlResolver>();
            this.contentLoader          = ServiceLocator.Current.GetInstance <IContentLoader>();
            this.contentCacheKeyCreator = ServiceLocator.Current.GetInstance <IContentCacheKeyCreator>();
            this.cache = ServiceLocator.Current.GetInstance <ISynchronizedObjectInstanceCache>();

            this.taxonomyRoot = this.contentRootService.Get(TaxonomyRepositoryDescriptor.RepositoryKey);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsService"/> class.
        /// </summary>
        /// <param name="contentRepository">The content repository.</param>
        /// <param name="contentRootService">The content root service.</param>
        /// <param name="typeScannerLookup">The type scanner lookup.</param>
        /// <param name="contentTypeRepository">The content type repository.</param>
        /// <param name="ancestorReferencesLoader">The ancestor references loader.</param>
        public SettingsService(
            IContentRepository contentRepository,
            ContentRootService contentRootService,
            ITypeScannerLookup typeScannerLookup,
            IContentTypeRepository contentTypeRepository,
            AncestorReferencesLoader ancestorReferencesLoader)
        {
            this.contentRepository        = contentRepository;
            this.contentRootService       = contentRootService;
            this.typeScannerLookup        = typeScannerLookup;
            this.contentTypeRepository    = contentTypeRepository;
            this.ancestorReferencesLoader = ancestorReferencesLoader;

            GlobalSettings = new Dictionary <Type, object>();
        }
예제 #4
0
 public SettingsService(
     IContentRepository contentRepository,
     ContentRootService contentRootService,
     ITypeScannerLookup typeScannerLookup,
     IContentTypeRepository contentTypeRepository,
     IContentEvents contentEvents,
     ISiteDefinitionEvents siteDefinitionEvents,
     ISiteDefinitionRepository siteDefinitionRepository,
     ISiteDefinitionResolver siteDefinitionResolver,
     IHttpContextAccessor httpContextAccessor)
 {
     _contentRepository        = contentRepository;
     _contentRootService       = contentRootService;
     _typeScannerLookup        = typeScannerLookup;
     _contentTypeRepository    = contentTypeRepository;
     _contentEvents            = contentEvents;
     _siteDefinitionEvents     = siteDefinitionEvents;
     _siteDefinitionRepository = siteDefinitionRepository;
     _siteDefinitionResolver   = siteDefinitionResolver;
     _httpContextAccessor      = httpContextAccessor;
 }
예제 #5
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="TaxonomyRepositoryDescriptor"/> class.
        /// </summary>
        /// <param name="contentRootService">The content root service to use.</param>
        public TaxonomyRepositoryDescriptor(ContentRootService contentRootService)
        {
            this.contentRootService = contentRootService;

            this.root = this.contentRootService.Get(this.Key);
        }
 public PeopleContentRepositoryDescriptor(ContentRootService contentRootService)
 {
     _root = contentRootService.Get("People");
 }
예제 #7
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="TaxonomyContentReferenceEditorDescriptor"/> class.
        /// </summary>
        /// <param name="contentRootService">The content root service to use.</param>
        public TaxonomyContentReferenceEditorDescriptor(ContentRootService contentRootService)
        {
            this.contentRootService = contentRootService;

            this.AllowedTypes = new[] { typeof(TaxonomyData) };
        }