Exemplo n.º 1
0
 public ContentVirtualFile(Repository repository, string requestedPath, string pathKey, ViewEngineOptions viewEngine)
     : base(requestedPath)
 {
     _pathKey = pathKey;
     _repository = repository;
     _viewEngine = viewEngine;
 }
Exemplo n.º 2
0
        public DefaultConfiguration(MeekConfigurationSection config)
        {
            _config = config;

            AltManageContentRoute = string.IsNullOrWhiteSpace(_config.AltManageContentRoute) ? "Missing" : _config.AltManageContentRoute;
            CkEditorPath = string.IsNullOrWhiteSpace(_config.CkEditorPath) ? "/Meek/ckeditor" : _config.CkEditorPath;
            NotFoundView = config.NotFoundView;
            ViewEngineOptions = new ViewEngineOptions
                                    {
                                        Type = string.IsNullOrWhiteSpace(_config.ViewEngine) ? ViewEngineType.Razor : (ViewEngineType)Enum.Parse(typeof(ViewEngineType), _config.ViewEngine, true),
                                        IncludeFormTag = true
                                    };
            if (ViewEngineOptions.Type == ViewEngineType.ASPX)
            {
                ViewEngineOptions.Layout = _config.AspxConfig.MasterPage;
                ViewEngineOptions.PlaceHolder = _config.AspxConfig.ContentPlaceHolderId;
                ViewEngineOptions.IncludeFormTag = _config.AspxConfig.IncludeFormTag;
            }
        }
Exemplo n.º 3
0
        public DefaultConfiguration(MeekConfigurationSection config)
        {
            _config = config;

            AltManageContentRoute = string.IsNullOrWhiteSpace(_config.AltManageContentRoute) ? "Missing" : _config.AltManageContentRoute;
            CkEditorPath          = string.IsNullOrWhiteSpace(_config.CkEditorPath) ? "/Meek/ckeditor" : _config.CkEditorPath;
            NotFoundView          = config.NotFoundView;
            ViewEngineOptions     = new ViewEngineOptions
            {
                Type           = string.IsNullOrWhiteSpace(_config.ViewEngine) ? ViewEngineType.Razor : (ViewEngineType)Enum.Parse(typeof(ViewEngineType), _config.ViewEngine, true),
                IncludeFormTag = true
            };
            if (ViewEngineOptions.Type == ViewEngineType.ASPX)
            {
                ViewEngineOptions.Layout         = _config.AspxConfig.MasterPage;
                ViewEngineOptions.PlaceHolder    = _config.AspxConfig.ContentPlaceHolderId;
                ViewEngineOptions.IncludeFormTag = _config.AspxConfig.IncludeFormTag;
            }
        }