public void Initialize(InitializationEngine context)
        {
            if (_initialized || ContentReference.IsNullOrEmpty(GlobalNewsContainer) || context.HostType != HostType.WebApplication)
            {
                return;
            }

            var providerManager = ServiceLocator.Current.GetInstance<IContentProviderManager>();
            var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
            var startPages = contentLoader.GetChildren<PageData>(SiteDefinition.Current.RootPage).OfType<StartPage>();

            // Attach content provider to each site's global news container
            foreach (var startPage in startPages.Where(startPage => !ContentReference.IsNullOrEmpty(startPage.GlobalNewsPageLink)))
            {
                try
                {
                    Logger.Debug("Attaching global news content provider to page {0} [{1}], global news will be retrieved from page {2} [{3}]",
                        contentLoader.Get<PageData>(startPage.GlobalNewsPageLink).Name,
                        startPage.GlobalNewsPageLink.ID,
                        contentLoader.Get<PageData>(GlobalNewsContainer).PageName,
                        GlobalNewsContainer.ID);

                    var provider = new ClonedContentProvider(GlobalNewsContainer.ToPageReference(), startPage.GlobalNewsPageLink, startPage.Category);

                    providerManager.ProviderMap.AddProvider(provider);
                }
                catch (Exception ex)
                {
                    Logger.Error("Unable to create global news content provider for start page with ID {0}: {1}", startPage.PageLink.ID, ex.Message);
                }
            }

            _initialized = true;
        }
        public void Initialize(InitializationEngine context)
        {
            _provider = ServiceLocator.Current.GetInstance<IDisplayModeFallbackProvider>();
            _provider?.Initialize();

            RegisterDisplayOptions();
        }
コード例 #3
0
        /// <summary>
        /// The initialize.
        /// </summary>
        /// <param name="context">
        /// The context.
        /// </param>
        public void Initialize(InitializationEngine context)
        {
            if (this.initialized || context == null || context.HostType != HostType.WebApplication)
            {
                return;
            }

            Logger.Info("[OutputFormats] Initializing Output WebApi.");

            context.Locate.DisplayChannelService()
                .RegisterDisplayMode(
                    new DefaultDisplayMode(OutputConstants.JSON) { ContextCondition = ContextHelper.IsJsonDisplayModeActive }, 
                    0);

            context.Locate.DisplayChannelService()
                .RegisterDisplayMode(
                    new DefaultDisplayMode(OutputConstants.XML) { ContextCondition = ContextHelper.IsXmlDisplayModeActive }, 
                    0);

            context.Locate.DisplayChannelService()
                .RegisterDisplayMode(
                    new DefaultDisplayMode(OutputConstants.Text) { ContextCondition = ContextHelper.IsTxtDisplayModeActive }, 
                    0);

            context.Locate.DisplayChannelService()
                .RegisterDisplayMode(
                    new DefaultDisplayMode(OutputConstants.PDF) { ContextCondition = ContextHelper.IsPdfDisplayModeActive }, 
                    0);

            this.initialized = true;

            Logger.Info("[OutputFormats] Output WebApi initialized.");
        }
コード例 #4
0
        //   protected Injected<SettingsRepository> SettingsRepository { get; set; }
        public void Initialize(InitializationEngine context)
        {
            var registerFolder = context.Locate.Advanced.GetInstance<SingleModelRegister<InstagramFolder>>();
            registerFolder.RegisterType();
            var registerInstaImage = context.Locate.Advanced.GetInstance<SingleModelRegister<InstaImage>>();
            registerInstaImage.RegisterType();

            var contentRepository = context.Locate.ContentRepository();
            var entryPoint = contentRepository.GetChildren<InstagramFolder>(ContentReference.RootPage).FirstOrDefault();
            if (entryPoint == null)
            {
                entryPoint = contentRepository.GetDefault<InstagramFolder>(ContentReference.RootPage);
                entryPoint.Name = "Instagram";
                contentRepository.Save(entryPoint, SaveAction.Publish, AccessLevel.NoAccess);
            }

            // Register custom content provider
            var providerValues = new NameValueCollection();
            providerValues.Add(ContentProviderElement.EntryPointString, entryPoint.ContentLink.ID.ToString());
            providerValues.Add(ContentProviderElement.CapabilitiesString, ContentProviderElement.FullSupportString);
            var instagramProvider = new InstagramContentProvider((context.Locate.ContentTypeRepository()));
            instagramProvider.Initialize("instagramprovider", providerValues);
            var providerManager = context.Locate.Advanced.GetInstance<IContentProviderManager>();
            providerManager.ProviderMap.AddProvider(instagramProvider);
        }
コード例 #5
0
 public void Initialize(InitializationEngine context)
 {
     logger.Info("attaching to DataFactory.Instance.CreatingPage");
     DataFactory.Instance.CreatingPage += CheckConstraints;
     DataFactory.Instance.SavingPage += CheckConstraints;
     DataFactory.Instance.PublishingPage += CheckConstraints;
 }
コード例 #6
0
ファイル: InitializeModule.cs プロジェクト: Sebbe/Tags
 public void Initialize(InitializationEngine context)
 {
     RouteTable.Routes.MapRoute(
         "GetaTags",
         "getatags",
         new { action = "Index", controller = "GetaTags" });
 }
コード例 #7
0
 public void Initialize(InitializationEngine context)
 {
     if (context.HostType == HostType.WebApplication)
     {
         RegisterBundles(BundleTable.Bundles);
     }
 }
コード例 #8
0
 public void Initialize(InitializationEngine context)
 {
     if (context.HostType == HostType.WebApplication)
     {
         XFormControl.ControlSetup += new EventHandler(XForm_ControlSetup);
     }
 }
コード例 #9
0
ファイル: TagsModule.cs プロジェクト: sebastianbrand/Tags
        public void Initialize(InitializationEngine context)
        {
            _tagService = new TagService();
            _pageTypeRepository = ServiceLocator.Current.GetInstance<PageTypeRepository>();

            DataFactory.Instance.PublishedPage += OnPublishedPage;
        }
        /// <summary>
        /// Initializes the specified context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void Initialize(InitializationEngine context)
        {
            if (_initialized)
            {
                return;
            }

            _contentEvents.Service.CreatingContent += CreatingContent;
            _contentEvents.Service.MovingContent += MovingContent;

            var contentTypes = _contentTypeRepository.Service.List();
            var disableAtMax = false;

            foreach (var contentType in contentTypes)
            {
                if (contentType.ModelType.IsDefined(typeof(RestrictMultipleAttribute), false))
                {
                    var attribute = contentType.ModelType.GetCustomAttributes(typeof(RestrictMultipleAttribute), false)[0] as RestrictMultipleAttribute;
                    if (attribute.DisableAtMax)
                    {
                        disableAtMax = true;
                        break;
                    }
                }
            }

            if (disableAtMax)
            {
                _contentEvents.Service.CreatedContent += CreatedContent;
                _contentEvents.Service.DeletedContent += DeletedContent;
            }

            _initialized = true;
        }
        public void Initialize(InitializationEngine context)
        {
            if (PayExSettings.Instance.DisablePaymentMethodCreation)
                return;

            string paymentGatewayClassname = ConcatenateClassAndAssemblyName(typeof(PayExPaymentGateway));
            string payExPaymentClassName = ConcatenateClassAndAssemblyName(typeof (PayExPayment));
            string extendedPayExPaymentClassName = ConcatenateClassAndAssemblyName(typeof(ExtendedPayExPayment));

            var paymentMethodInfo = new List<PaymentMethodInfo>
            {
                new PaymentMethodInfo(Constants.Payment.CreditCard.SystemKeyword, Constants.Payment.CreditCard.Name, paymentGatewayClassname, payExPaymentClassName, 1000),
                new PaymentMethodInfo(Constants.Payment.InvoiceLedger.SystemKeyword, Constants.Payment.InvoiceLedger.Name, paymentGatewayClassname, payExPaymentClassName, 1100),
                new PaymentMethodInfo(Constants.Payment.Invoice.SystemKeyword, Constants.Payment.Invoice.Name, paymentGatewayClassname, payExPaymentClassName, 1200),
                new PaymentMethodInfo(Constants.Payment.DirectDebit.SystemKeyword, Constants.Payment.DirectDebit.Name, paymentGatewayClassname, payExPaymentClassName, 1300),
                new PaymentMethodInfo(Constants.Payment.PartPayment.SystemKeyword, Constants.Payment.PartPayment.Name, paymentGatewayClassname, extendedPayExPaymentClassName, 1400),
                new PaymentMethodInfo(Constants.Payment.PayPal.SystemKeyword, Constants.Payment.PayPal.Name, paymentGatewayClassname, payExPaymentClassName, 1500),
                new PaymentMethodInfo(Constants.Payment.Giftcard.SystemKeyword, Constants.Payment.Giftcard.Name, paymentGatewayClassname, payExPaymentClassName, 1600),
                new PaymentMethodInfo(Constants.Payment.MasterPass.SystemKeyword, Constants.Payment.MasterPass.Name, paymentGatewayClassname, payExPaymentClassName, 1700),
                new PaymentMethodInfo(Constants.Payment.FinancingInvoiceNorway.SystemKeyword, Constants.Payment.FinancingInvoiceNorway.Name, paymentGatewayClassname, extendedPayExPaymentClassName, 1800),
                new PaymentMethodInfo(Constants.Payment.FinancingInvoiceSweden.SystemKeyword, Constants.Payment.FinancingInvoiceSweden.Name, paymentGatewayClassname, extendedPayExPaymentClassName, 1900),
            };

            CreateForEnabledLanguages(paymentMethodInfo);
        }
コード例 #12
0
        /// <summary>
        /// Initialize
        /// </summary>
        /// <param name="context"></param>
        public void Initialize(InitializationEngine context)
        {
            SearchClient.Instance.Conventions.UnifiedSearchRegistry.Add<Employee>();
            SearchClient.Instance.Conventions.UnifiedSearchRegistry.Add<Company>();

            SearchClient.Instance.Conventions.NestedConventions.Add<Company>(company => company.Employees);
        }
コード例 #13
0
        public void Initialize(InitializationEngine context)
        {
            FeedInformationHandler.SetDefaultBehaviour();

            var resolver = ServiceLocator.Current.GetInstance<TemplateResolver>();
            resolver.TemplateResolved += TemplateResolverOnTemplateResolved;
        }
        public void CanInitialize()
        {
            var initializationEngine = new InitializationEngine();
            var restrictMultipleAttributeInitialization = new RestrictMultipleAttributeInitialization();

            restrictMultipleAttributeInitialization.Initialize(initializationEngine);
        }
コード例 #15
0
        public void Uninitialize(InitializationEngine context)
        {
            var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>();

            contentEvents.CreatingContent -= ContentEventsOnCreatingContent;
            contentEvents.MovingContent -= ContentEventsOnMovingContent;
        }
コード例 #16
0
 void IInitializableModule.Uninitialize(InitializationEngine context)
 {
     if (_enabled)
     {
         DataImporter.Importing -= DataImporter_Importing;
         DataImporter.ContentImporting -= DataImporter_ContentImporting;
     }
 }
コード例 #17
0
 public void Initialize(InitializationEngine context)
 {
     GlobalConfiguration.Configure(delegate(HttpConfiguration config){
     
         config.EnsureInitialized();
         config.Formatters.Add(new BinaryMediaTypeFormatter());
     });
 }
コード例 #18
0
ファイル: TagsModule.cs プロジェクト: Geta/Tags
        public void Initialize(InitializationEngine context)
        {
            this._tagService = ServiceLocator.Current.GetInstance<ITagService>();
            this._contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
            this._contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>();

            this._contentEvents.PublishedContent += OnPublishedContent;
        }
コード例 #19
0
 public void Initialize(InitializationEngine context)
 {
     var mobileChannelDisplayMode = new DefaultDisplayMode("mobile")
     {
         ContextCondition = IsMobileDisplayModeActive
     };
     DisplayModeProvider.Instance.Modes.Insert(0, mobileChannelDisplayMode);
 }
        public void Initialize(InitializationEngine context)
        {
            if (string.IsNullOrWhiteSpace(PayExSettings.Instance.AccountNumber.ToString()))
                Log.Error("The PayEx payment provider will not work unless you supply an Account Number in the payment provider module settings!");

            if (string.IsNullOrWhiteSpace(PayExSettings.Instance.EncryptionKey))
                Log.Error("The PayEx payment provider will not work unless you supply an encryption key in the payment provider module settings!");
        }
コード例 #21
0
        public void Initialize(InitializationEngine context)
        {
            //Add initialization logic, this method is called once after CMS has been initialized

            var repo = ServiceLocator.Current.GetInstance<IContentEvents>();

            repo.MovingContent += RepoOnMovingContent;
        }
コード例 #22
0
        public void Uninitialize(InitializationEngine context)
        {
            var eventRegistry =
           ServiceLocator.Current.GetInstance<IContentEvents>();

            eventRegistry.CreatingContent -= SavingMediaFile;
            eventRegistry.SavingContent -= SavingMediaFile;
        }
 public System.Collections.Generic.IEnumerable<VirtualPathProvider> CreateProviders(InitializationEngine context)
 {
     if (context.HostType.Equals(HostType.WebApplication))
     {
         return new VirtualPathProvider[] { new AssemblyResourceProvider() };
     }
     return Enumerable.Empty<VirtualPathProvider>();
 }
コード例 #24
0
        public void Initialize(InitializationEngine context)
        {
            DataFactory.Instance.CreatingPage +=Instance_CreatingPage;

            var partialRouter = new BlogPartialRouter();

            RouteTable.Routes.RegisterPartialRouter<BlogStartPage, Category>(partialRouter);

        }
コード例 #25
0
 public void Initialize(InitializationEngine context)
 {
     if (!_eventsAttached)
     {
         //TODO: Cant find out how to do this using the repo
         DataFactory.Instance.PublishingContent += this.OnPublishingContent;
         _eventsAttached = true;
     }
 }
        public void Initialize(InitializationEngine context)
        {
            //Add custom view engine allowing partials to be placed in additional locations
            //Note that we add it first in the list to optimize view resolving when using DisplayFor/PropertyFor
            ViewEngines.Engines.Insert(0, new SiteViewEngine());

            context.Locate.TemplateResolver()
                .TemplateResolved += TemplateCoordinator.OnTemplateResolved;
        }
コード例 #27
0
 private void AddAssociationGroups(InitializationEngine context)
 {
     // Add predefined selections CrossSell and UpSell
     // If they already exist nothing will be added
     var associationDefinitionRepository =
         context.Locate.Advanced.GetInstance<GroupDefinitionRepository<AssociationGroupDefinition>>();
     associationDefinitionRepository.Add(new AssociationGroupDefinition { Name = Constants.CrossSellGroupName });
     associationDefinitionRepository.Add(new AssociationGroupDefinition { Name = Constants.UpSellGroupName });
 }
コード例 #28
0
 public void Initialize(InitializationEngine context)
 {
     var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>();
     contentEvents.DeletedContent += ContentEventsOnDeletedContent;
     contentEvents.DeletedContentLanguage += ContentEventsOnPublishedContent;
     contentEvents.DeletedContentVersion += ContentEventsOnPublishedContent;
     contentEvents.MovedContent += ContentEventsOnPublishedContent;
     contentEvents.PublishedContent += ContentEventsOnPublishedContent;
 }
コード例 #29
0
 void IInitializableModule.Initialize(InitializationEngine context)
 {
     _enabled = ServiceLocator.Current.GetInstance<IComposerImportOptions>().Enabled;
     if (_enabled)
     {
         DataImporter.Importing += DataImporter_Importing;
         DataImporter.ContentImporting += DataImporter_ContentImporting;
     }
 }
 public void Initialize(InitializationEngine context)
 {
     Log.Debug("Initializing 404 handler version check");
     var dba = DataAccessBaseEx.GetWorker();
     var version = dba.CheckModuleVersion();
     if (version != RedirectConfiguration.CurrentVersion)
         StartUpgrade(version);
     else
         Upgrader.Valid = true;
 }
コード例 #31
0
        public static void InitializeFoundationFindCms(this InitializationEngine context)
        {
            InitializeFacets(_facetConfigFactory.Value.GetFacetFilterConfigurationItems());

            _contentEvents.Value.PublishedContent += OnPublishedContent;
        }
 public void Initialize(InitializationEngine context)
 {
     context.InitComplete += Context_InitComplete;
 }
 public void Uninitialize(InitializationEngine context)
 {
     context.Locate.Advanced.GetInstance <OrderEventListener>().RemoveEvents();
 }
コード例 #34
0
 public void Uninitialize(InitializationEngine context)
 {
     OrderContext.Current.OrderGroupUpdated -= Current_OrderGroupUpdated;
 }
コード例 #35
0
 public void Initialize(InitializationEngine context)
 {
     context.Locate.Advanced.GetInstance <IGoogleProductFeedService>().CreateFeed <VariationContent>("Default");
 }
コード例 #36
0
 public void Uninitialize(InitializationEngine initializationEngine)
 {
 }
 /// <summary>
 /// Resets the module into an uninitialized state.
 ///
 /// </summary>
 /// <param name="context">The context.</param>
 /// <remarks>
 ///
 /// <para>
 /// This method is usually not called when running under a web application since the web app may be shut down very
 ///             abruptly, but your module should still implement it properly since it will make integration and unit testing
 ///             much simpler.
 ///
 /// </para>
 ///
 /// <para>
 /// Any work done by <see cref="M:EPiServer.Framework.IInitializableModule.Initialize(EPiServer.Framework.Initialization.InitializationEngine)"/> as well as any code executing on <see cref="E:EPiServer.Framework.Initialization.InitializationEngine.InitComplete"/> should be reversed.
 ///
 /// </para>
 ///
 /// </remarks>
 public void Uninitialize(InitializationEngine context)
 {
     //_broadcaster.InventoryUpdated -= _listener.InventoryUpdated;
     //_broadcaster.PriceUpdated -= _listener.PriceUpdated;
     //_listener.RemoveEvent();
 }
コード例 #38
0
 void IInitializableModule.Initialize(InitializationEngine context) => context.InitComplete += (sender, eventArgs) => context.Locate.Advanced.GetInstance <ISettingsService>().InitializeSettings();
コード例 #39
0
 public void Initialize(InitializationEngine context)
 {
     //Add initialization logic, this method is called once after CMS has been initialized
     GlobalFilters.Filters.Add(ServiceLocator.Current.GetInstance <PageContextActionFilter>());
 }
コード例 #40
0
 public void Initialize(InitializationEngine context)
 {
     CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);
 }
コード例 #41
0
 void IInitializableModule.Uninitialize(InitializationEngine context)
 {
 }
コード例 #42
0
 public void Uninitialize(InitializationEngine context)
 {
     ServiceLocator.Current.GetInstance <TemplateResolver>()
     .TemplateResolved -= TemplateCoordinator.OnTemplateResolved;
 }
コード例 #43
0
 public void Initialize(InitializationEngine context)
 {
     GlobalFilters.Filters.Add(ServiceLocator.Current.GetInstance <PageContextActionFilter>());
 }
コード例 #44
0
 public void Uninitialize(InitializationEngine context)
 {
 }
コード例 #45
0
 public void Uninitialize(InitializationEngine context)
 {
     ConfigurationContext.Current.CacheManager.OnRemove -= CacheManagerOnOnRemove;
 }
コード例 #46
0
 public void Uninitialize(InitializationEngine context)
 {
     DataFactory.Instance.LoadedPage            -= DataFactory_LoadedPage;
     DataFactory.Instance.LoadedChildren        -= DataFactory_LoadedChildren;
     DataFactory.Instance.LoadedDefaultPageData -= DataFactory_LoadedPage;
 }
コード例 #47
0
 public void Uninitialize(InitializationEngine context)
 {
     context.Locate.ContentEvents().SavingContent -= _contentEventHandlers.SavingContentHandler;
 }
コード例 #48
0
 public void Uninitialize(InitializationEngine context) => context.Locate.Advanced.GetInstance <ITemplateResolverEvents>().TemplateResolved -= TemplateCoordinator.OnTemplateResolved;
コード例 #49
0
 public void Initialize(InitializationEngine initializationEngine)
 {
     Logger.Debug("Start Initialize()");
     CreateTable();
 }
コード例 #50
0
 public void Uninitialize(InitializationEngine context)
 {
     DataExportEvents.Service.ContentExporting -= DataExportEvents_ContentExporting;
 }
コード例 #51
0
 public void Uninitialize(InitializationEngine context)
 {
     context.InitComplete -= ContextOnInitComplete;
 }
        public void Initialize(InitializationEngine context)
        {
            // routing fund.
            //CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes,, false);

            // routing adv.
            CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, () =>
            {
                // the scheduled job still have troubles
                var contentLoader = ServiceLocator.Current.GetInstance <IContentLoader>();

                // If epi-Find-error in exercise, it's the "catalog start"
                var startPage = new ContentReference(9);

                //var startPage = contentLoader.Get<PageData>(ContentReference.StartPage);
                if (startPage == null)                    // should maybe check for the "setting-prop"
                {
                    return(ContentReference.WasteBasket); //.StartPage;
                }

                //var homePage = startPage as StartPage;

                //return homePage != null ? homePage.Settings.catalogStartPageLink : ContentReference.StartPage;

                // if Find issues
                return(startPage);
            }
                                                           , false);

            #region Partial Routing Simplified... Conceptually
            //CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, () =>
            //{
            //    var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
            //    var startPage = contentLoader.Get<StartPage>(ContentReference.StartPage);
            //    return startPage.Settings.catalogStartPageLink;
            //}
            //, false);
            #endregion

            #region Events CMS & ECF

            // Nice for Entry Pricing and Inventory updates
            CatalogKeyEventBroadcaster e =
                ServiceLocator.Current.GetInstance <CatalogKeyEventBroadcaster>();

            e.PriceUpdated     += e_PriceUpdated;
            e.InventoryUpdated += e_InventoryUpdated;

            Event.Get(CatalogEventBroadcaster.CommerceProductUpdated).Raised += EB;


            // this is the old one for Orders
            //OrderContext.Current.OrderGroupUpdated += Current_OrderGroupUpdated;

            // Good stuff for Orders ...\Infrastructure\CartAndCheckout\NewOrderEvents.cs
            //IOrderRepositoryCallback orc =
            //    ServiceLocator.Current.GetInstance<IOrderRepositoryCallback>();

            IContentEvents e2 = ServiceLocator.Current.GetInstance <IContentEvents>(); // ...the way to go
            e2.RequestedApproval += E2_RequestedApproval;
            e2.PublishedContent  += E2_PublishedContent;

            #endregion

            // new in 10.1.0
            SetPromotionExclusions(context);
        }
コード例 #53
0
 public void Initialize(InitializationEngine context)
 {
     _locator = context.Locate.Advanced;
     OrderContext.Current.OrderGroupUpdated += Current_OrderGroupUpdated;
 }
コード例 #54
0
 public void Initialize(InitializationEngine context)
 {
     //Add initialization logic, this method is called once after CMS has been initialized
 }
コード例 #55
0
 public void Uninitialize(InitializationEngine context)
 {
     //Add uninitialization logic
 }
コード例 #56
0
 public void Initialize(InitializationEngine context)
 {
     DependencyResolver.SetResolver(new ServiceLocatorDependencyResolver(context.Locate.Advanced));
 }
コード例 #57
0
 public void Uninitialize(InitializationEngine context)
 {
     _routingEventHandler?.Dispose();
     _routingEventHandler = null;
 }
コード例 #58
0
 public void Initialize(InitializationEngine context)
 {
     CatalogEventBroadcaster.Instance.LocalEntryUpdating    += InstanceOnLocalEntryUpdating;
     CatalogEventBroadcaster.Instance.LocalRelationUpdating += InstanceOnLocalRelationUpdating;
 }
コード例 #59
0
 public void Uninitialize(InitializationEngine context)
 {
     Global.RoutesRegistrating -= Global_RoutesRegistrating;
 }
コード例 #60
0
 public void Initialize(InitializationEngine context)
 {
     ContentIndexer.Instance.Conventions.ForInstancesOf <IContent>().ShouldIndex(_ => false);
     ContentIndexer.Instance.Conventions.ForInstancesOf <PageData>().ShouldIndex(ShouldIndexPage);
     ContentIndexer.Instance.Conventions.ForInstancesOf <MediaData>().ShouldIndex(ShouldIndexMedia);
 }