/// <summary>
        /// Initializes a new instance of the <see cref="DefaultViewService"/> class.
        /// </summary>
        public DefaultViewService(DefaultViewServiceOptions config, IViewLoader viewLoader)
        {
            if (config == null) throw new ArgumentNullException("config");
            if (viewLoader == null) throw new ArgumentNullException("viewLoader");

            this.config = config;
            this.viewLoader = viewLoader;
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public SchemeApiController(IWebContext webContext, IUserContext userContext,
                            IClientAccessor clientAccessor, IViewLoader viewLoader)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
 }
Exemple #3
0
 public TableViewModel(IWebContext webContext, IUserContext userContext,
                       IViewLoader viewLoader, PluginContext pluginContext)
 {
     this.webContext    = webContext;
     this.userContext   = userContext;
     this.viewLoader    = viewLoader;
     this.pluginContext = pluginContext;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="WindowsInputBox"/> class.
        /// </summary>
        /// <param name="viewLoader">The view loader that is used to show the input box.</param>
        /// <exception cref="System.ArgumentNullException">viewLoader cannot be null.</exception>
        public WindowsInputBox(IViewLoader viewLoader)
        {
            if (viewLoader == null)
            {
                throw new ArgumentNullException("viewLoader");
            }

            this.viewLoader = viewLoader;
        }
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public MainApiController(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor,
                          IViewLoader viewLoader, IMemoryCache memoryCache, PluginContext pluginContext)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
     this.memoryCache    = memoryCache;
     this.pluginContext  = pluginContext;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public PrintController(IWebContext webContext, IUserContext userContext, IClientAccessor clientAccessor,
                        IViewLoader viewLoader, PluginContext pluginContext)
 {
     this.webContext     = webContext;
     this.userContext    = userContext;
     this.clientAccessor = clientAccessor;
     this.viewLoader     = viewLoader;
     this.pluginContext  = pluginContext;
     templateDir         = Path.Combine(webContext.AppDirs.ExeDir, "wwwroot", "plugins", "Main", "templates");
 }
Exemple #7
0
 internal IViewLoader GetLoader()
 {
     if (_loader == null)
     {
         IViewLoader loader = ViewLoader ?? new FileSystemWithEmbeddedFallbackViewLoader();
         if (CacheViews)
         {
             loader = new CachingLoader(loader);
         }
         _loader = loader;
     }
     return(_loader);
 }
Exemple #8
0
 public MvcViewService(
     HttpContextBase httpContext,
     DefaultViewServiceOptions config,
     IViewLoader viewLoader,
     IControllerFactory controllerFactory,
     ViewEngineCollection viewEngineCollection)
 {
     this.httpContext          = httpContext;
     this.config               = config;
     this.defaultViewService   = new DefaultViewService(this.config, viewLoader);
     this.controllerFactory    = controllerFactory;
     this.viewEngineCollection = viewEngineCollection;
 }
 internal IViewLoader GetLoader()
 {
     if (_loader == null)
     {
         IViewLoader loader = ViewLoader ?? new FileSystemWithEmbeddedFallbackViewLoader();
         if (CacheViews)
         {
             loader = new CachingLoader(loader);
         }
         _loader = loader;
     }
     return _loader;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultViewService"/> class.
        /// </summary>
        public DefaultViewService(DefaultViewServiceOptions config, IViewLoader viewLoader)
        {
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }
            if (viewLoader == null)
            {
                throw new ArgumentNullException("viewLoader");
            }

            this.config     = config;
            this.viewLoader = viewLoader;
        }
        public AddUserDefinedBurnDownController(
            [NotNull] AddUserDefinedBurnDownDialogViewLoader viewLoader,
            [NotNull] IBurnDownChartsService chartsService)
        {
            if (viewLoader == null)
            {
                throw new ArgumentNullException(nameof(viewLoader));
            }

            if (chartsService == null)
            {
                throw new ArgumentNullException(nameof(chartsService));
            }

            this.viewLoader    = viewLoader;
            this.chartsService = chartsService;
        }
        public AddUserDefinedBurnDownController(
            [NotNull] AddUserDefinedBurnDownDialogViewLoader viewLoader,
            [NotNull] IBudgetBucketRepository bucketRepository)
        {
            if (viewLoader == null)
            {
                throw new ArgumentNullException("viewLoader");
            }

            if (bucketRepository == null)
            {
                throw new ArgumentNullException("bucketRepository");
            }

            this.viewLoader = viewLoader;
            this.bucketRepository = bucketRepository;
        }
        public AddUserDefinedBurnDownController(
            [NotNull] AddUserDefinedBurnDownDialogViewLoader viewLoader,
            [NotNull] IBurnDownChartsService chartsService)
        {
            if (viewLoader == null)
            {
                throw new ArgumentNullException(nameof(viewLoader));
            }

            if (chartsService == null)
            {
                throw new ArgumentNullException(nameof(chartsService));
            }

            this.viewLoader = viewLoader;
            this.chartsService = chartsService;
        }
Exemple #14
0
        private IView GetView(ViewInfo viewInfo)
        {
            IView view;

            if (viewInfo.Persistent && persistentViews[viewInfo.ViewID] != null)
            {
                view = GetPersistentView(viewInfo);
            }
            else
            {
                IViewLoader viewLoader = viewLoaderFactory.GetViewLoader(viewInfo);
                view = viewLoader.CreateView(viewInfo);

                if (viewInfo.Persistent)
                {
                    persistentViews[viewInfo.ViewID] = view;
                }
            }

            return(view);
        }
Exemple #15
0
 public LandingModel(IUserContext userContext, IViewLoader viewLoader)
 {
     this.userContext = userContext;
     this.viewLoader  = viewLoader;
     dict             = Locale.GetDictionary("Scada.Web.Plugins.PlgWebPage.Areas.Main.Pages.Landing");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CachingLoader" /> class.
 /// </summary>
 /// <param name="cache">The cache.</param>
 /// <param name="inner">The inner.</param>
 public CachingLoader(ResourceCache cache, IViewLoader inner)
 {
     this.cache = cache;
     this.inner = inner;
 }
Exemple #17
0
 public ViewModel(IWebContext webContext, IUserContext userContext, IViewLoader viewLoader)
 {
     this.webContext  = webContext;
     this.userContext = userContext;
     this.viewLoader  = viewLoader;
 }
Exemple #18
0
 public HtmlNegotiator(IViewLoader viewLoader)
 {
     this.viewLoader = viewLoader;
 }
Exemple #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CachingLoader"/> class.
 /// </summary>
 /// <param name="inner">The inner.</param>
 public CachingLoader(IViewLoader inner)
 {
     this.inner = inner;
 }
 public ViewFrameModel(IUserContext userContext, IViewLoader viewLoader)
 {
     this.userContext = userContext;
     this.viewLoader  = viewLoader;
 }
 public IdentityViewService(DefaultViewServiceOptions config, IViewLoader viewLoader)
     : base(config, viewLoader)
 {
 }
Exemple #22
0
 public CustomIdsViewService(DefaultViewServiceOptions config, IViewLoader viewLoader, ILogger logger, IControllerFactory controllerFactory)
     : base(config, viewLoader)
 {
     _logger            = logger;
     _controllerFactory = controllerFactory;
 }
Exemple #23
0
 public CustomIdsViewService(DefaultViewServiceOptions config, IViewLoader viewLoader)
     : this(config, viewLoader, LogManager.GetCurrentClassLogger(), ControllerBuilder.Current.GetControllerFactory())
 {
 }
Exemple #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CachingLoader" /> class.
 /// </summary>
 /// <param name="cache">The cache.</param>
 /// <param name="inner">The inner.</param>
 public CachingLoader(ResourceCache cache, IViewLoader inner)
 {
     this.cache = cache;
     this.inner = inner;
 }
 /// <summary>
 /// Конструктор просто инициализирует базовый класс.
 /// </summary>
 /// <param name="config">Объект <see cref="DefaultViewServiceOptions"/>.</param>
 /// <param name="viewLoader">Реализация <see cref="IViewLoader"/>.</param>
 public CustomViewService(DefaultViewServiceOptions config, IViewLoader viewLoader)
     : base(config, viewLoader)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CachingLoader"/> class.
 /// </summary>
 /// <param name="inner">The inner.</param>
 public CachingLoader(IViewLoader inner)
 {
     this.inner = inner;
 }