예제 #1
0
        private void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
        {
            //Telerik.Microsoft.Practices.EnterpriseLibrary.Caching.ICacheManager cazy = SystemManager.GetCacheManager(CacheManagerInstance.Configuration);


            if (e.CommandName == "Bootstrapped")
            {
                PublishingSystemFactory.UnregisterPipe(SearchIndexOutboundPipe.PipeName);
                PublishingSystemFactory.RegisterPipe(SearchIndexOutboundPipe.PipeName, typeof(ResourceLibraryOutboundPipe));
                //use UnauthorizedPageAccessEvent
                EventHub.Subscribe <IUnauthorizedPageAccessEvent>(new Telerik.Sitefinity.Services.Events.SitefinityEventHandler <IUnauthorizedPageAccessEvent>(OnUnauthorizedAccess));

                /*
                 * EventHub.Subscribe<IFormFieldValidatingEvent>(FormFileUploadFieldValidation);*/
                EventHub.Subscribe <IContextOperationEvent>(ContextOperationEvent);
            }

            if (e.CommandName == "RegisterRoutes")
            {
                RegisterRoutes(RouteTable.Routes);
                //ReplaceDefaultRoute(e.Data as IQueryable<RouteBase>);
                //SystemManager.RegisterServiceStackPlugin(new );
                //SystemManager.RegisterServiceStackPlugin(new MatrixGroup.Implementation.Services.Plugins.ServiceFeaturePlugin());
            }
        }
예제 #2
0
        /// <summary>
        /// With this method we subscribe for the Sitefinity Bootstrapper_Initialized
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void Bootstrapper_Initialized(object sender, ExecutedEventArgs e)
        {
            if (e.CommandName != "RegisterRoutes" || !Bootstrapper.IsDataInitialized)
            {
                return;
            }

            if (e.CommandName == "RegisterRoutes")
            {
                var configManager               = ConfigManager.GetManager();
                var virtualPathConfig           = configManager.GetSection <VirtualPathSettingsConfig>();
                var jobsModuleVirtualPathConfig = new VirtualPathElement(virtualPathConfig.VirtualPaths)
                {
                    VirtualPath      = "~/SoftwareDesign/*",
                    ResolverName     = "EmbeddedResourceResolver",
                    ResourceLocation = "SoftwareDesign"
                };
                if (!virtualPathConfig.VirtualPaths.Contains(jobsModuleVirtualPathConfig))
                {
                    virtualPathConfig.VirtualPaths.Add(jobsModuleVirtualPathConfig);
                    configManager.SaveSection(virtualPathConfig);
                }
            }

            InstallWidgets();

            PageCustomFields.CreateCustomFieldFluentAPI("EpiserverPageId", typeof(PageNode), typeof(Lstring), UserFriendlyDataType.ShortText);
            PageCustomFields.CreateCustomFieldFluentAPI("EpiserverUrlPath", typeof(PageNode), typeof(Lstring), UserFriendlyDataType.LongText);
            PageCustomFields.CreateCustomFieldFluentAPI("EpiserverPageId", typeof(NewsItem), typeof(Lstring), UserFriendlyDataType.ShortText);



            // Vince McNamara, Dahu ([email protected])
            // Start of Dahu changes - register Custom InboundPipes

            PublishingSystemFactory.UnregisterPipe(ContentInboundPipe.PipeName);
            PublishingSystemFactory.RegisterPipe(ContentInboundPipe.PipeName, typeof(CustomContentInboundPipe));
            PipeSettings contentPipeSettings = ContentInboundPipe.GetTemplatePipeSettings();

            contentPipeSettings.PipeName = "Dahu CustomContentInboundPipe";
            contentPipeSettings.Title    = "Dahu CustomContentInboundPipe";
            PublishingSystemFactory.RegisterPipeSettings("CustomContentInboundPipe", contentPipeSettings);


            PublishingSystemFactory.UnregisterPipe(PageInboundPipe.PipeName);
            PublishingSystemFactory.RegisterPipe(PageInboundPipe.PipeName, typeof(CustomPageInboundPipe));
            PipeSettings pagePipeSettings = PageInboundPipe.GetTemplatePipeSettings();

            pagePipeSettings.PipeName = "Dahu CustomContentInboundPipe";
            pagePipeSettings.Title    = "Dahu CustomPageInboundPipe";
            PublishingSystemFactory.RegisterPipeSettings("CustomPageInboundPipe", pagePipeSettings);

            PublishingSystemFactory.UnregisterPipe(DocumentInboundPipe.PipeName);
            PublishingSystemFactory.RegisterPipe(DocumentInboundPipe.PipeName, typeof(CustomDocumentInboundPipe));



            //  End Dahu Changes
        }
예제 #3
0
파일: Global.asax.cs 프로젝트: ossusa/3358
 void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
 {
     if (e.CommandName == "Bootstrapped")
     {
         //RegisterRoutes(RouteTable.Routes);
         PublishingSystemFactory.UnregisterPipe(SearchIndexOutboundPipe.PipeName);
         PublishingSystemFactory.RegisterPipe(SearchIndexOutboundPipe.PipeName, typeof(ResourceLibraryOutboundPipe));
     }
 }