Esempio n. 1
0
        public static void OnInitialized()
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }

            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            LogProvider.SetCurrentLogProvider(C1LogProvider.Instance);

            // Needed by C1, do not remove!

            _host.Init();

            var log = LogProvider.GetCurrentClassLogger();

            log.Info("Application Starting");

            DynamicTypeManager.EnsureCreateStore(typeof(ComposerPage));
            DynamicTypeManager.EnsureCreateStore(typeof(CategoryPage));

            var functions = MvcFunctionRegistry.NewFunctionCollection();

            RegisterFunctions(functions);
            RegisterFunctionRoutes(functions);

            DataEvents <IPage> .OnAfterAdd += UpdateAfterPageChanged;

            log.Info("Application Started");
        }
Esempio n. 2
0
        public static void OnInitialized()
        {
            Log.LogInformation("SearchQueryBuilder", "OnInitialized");

            var functions = MvcFunctionRegistry.NewFunctionCollection();

            RegisterFunctions(functions);
            RegisterFunctionRoutes(functions);
        }
Esempio n. 3
0
        public static void OnInitialized()
        {
            if (!HostingEnvironment.IsHosted)
            {
                return;
            }

            Log.LogInformation("SearchQueryBuilder", "OnInitialized");

            var functions = MvcFunctionRegistry.NewFunctionCollection();

            RegisterFunctions(functions);
            RegisterFunctionRoutes(functions);
        }
        public static void OnInitialized(KeywordChangeNotifier keywordChangeNotifier)
        {
            DynamicTypeManager.EnsureCreateStore(typeof(RedirectKeyword));

            DataEvents <RedirectKeyword> .OnAfterAdd    += keywordChangeNotifier.KeywordChange;
            DataEvents <RedirectKeyword> .OnAfterUpdate += keywordChangeNotifier.KeywordChange;
            DataEvents <RedirectKeyword> .OnDeleted     += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnAfterAdd    += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnAfterUpdate += keywordChangeNotifier.KeywordChange;
            DataEvents <IPage> .OnDeleted     += keywordChangeNotifier.KeywordChange;

            var functions = MvcFunctionRegistry.NewFunctionCollection();

            RegisterFunctions(functions);
            RegisterFunctionRoutes(functions);

            UrlToEntityTokenFacade.Register(new KeywordsUrlToEntityTokenMapper());
        }
Esempio n. 5
0
    public static void OnBeforeInitialize()
    {
        var functions = MvcFunctionRegistry.NewFunctionCollection();

        functions.RouteCollection.MapMvcAttributeRoutes();
        functions.RouteCollection.MapRoute(
            "Default",
            "{controller}/{action}/{id}",
            new { action = "Index", id = UrlParameter.Optional }
            );


        functions.RegisterAction <AccountController>("Login", "Demo.Account.Login");

        functions.RegisterAction <EBookController>("UploadFile", "Demo.Ebook.UploadFile");
        functions.RegisterAction <EBookController>("UploadFiles", "Demo.Ebook.Upload File List");
        functions.RegisterAction <EBookController>("Detail", "Demo.Ebook.Detail");
    }