Exemple #1
0
        public void Initialize(InitializationEngine context)
        {
            _locator = context.Locate.Advanced;
            var manager = context.Locate.Advanced.GetInstance <MigrationManager>();

            if (manager.SiteNeedsToBeMigrated())
            {
                manager.Migrate();
            }

            ViewEngines.Engines.Insert(0, new FeaturesViewEngine());
            context.InitializeFoundationCommerce();

            var handler = GlobalConfiguration.Configuration.MessageHandlers
                          .FirstOrDefault(x => x.GetType() == typeof(PassiveAuthenticationMessageHandler));

            if (handler != null)
            {
                GlobalConfiguration.Configuration.MessageHandlers.Remove(handler);
            }

            context.InitComplete += ContextOnInitComplete;

            SearchClient.Instance.Conventions.UnifiedSearchRegistry
            .ForInstanceOf <LocationListPage>()
            .ProjectImageUriFrom(page => new Uri(context.Locate.Advanced.GetInstance <UrlResolver>().GetUrl(page.PageImage), UriKind.Relative));

            SearchClient.Instance.Conventions.ForInstancesOf <LocationItemPage>().IncludeField(dp => dp.TagString());
        }
Exemple #2
0
        public void Initialize(InitializationEngine context)
        {
            var manager = context.Locate.Advanced.GetInstance <MigrationManager>();

            if (manager.SiteNeedsToBeMigrated())
            {
                manager.Migrate();
            }

            context.InitializeFoundationCms();
            context.InitializeFoundationCommerce();
            context.InitializeFoundationDemo();


            var options = context.Locate.Advanced.GetInstance <BlockEnhancementsOptions>();

            options.InlineEditing = true;
            options.PublishWithLocalContentItems = true;
            options.ContentDraftView             = true;
            options.InlinePublish   = true;
            options.StatusIndicator = true;

            var handler = GlobalConfiguration.Configuration.MessageHandlers
                          .FirstOrDefault(x => x.GetType() == typeof(PassiveAuthenticationMessageHandler));

            if (handler != null)
            {
                GlobalConfiguration.Configuration.MessageHandlers.Remove(handler);
            }
        }
Exemple #3
0
        public void Initialize(InitializationEngine context)
        {
            var manager = context.Locate.Advanced.GetInstance <MigrationManager>();

            if (manager.SiteNeedsToBeMigrated())
            {
                manager.Migrate();
            }

            context.InitializeFoundationCms();
            context.InitializeFoundationCommerce();
            context.InitializeFoundationFindCms();
            context.InitializeFoundationDemo();


            var handler = GlobalConfiguration.Configuration.MessageHandlers
                          .FirstOrDefault(x => x.GetType() == typeof(PassiveAuthenticationMessageHandler));

            if (handler != null)
            {
                GlobalConfiguration.Configuration.MessageHandlers.Remove(handler);
            }

            //GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
        }