public InternalTemplateService(RazorEngineCore service, ITemplateKey template)
        {
            Contract.Requires(service != null);
            Contract.Requires(template != null);

            _service = service;
            _template = template;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialises a new instance of <see cref="TemplateService"/>
        /// </summary>
        /// <param name="config">The template service configuration.</param>
        internal RazorEngineService(ITemplateServiceConfiguration config)
        {
            Contract.Requires(config != null);

            _config = config;
            //_core = new RazorEngineCore(config, this);
            _core_with_cache = new RazorEngineCoreWithCache(config, this);
        }
Exemplo n.º 3
0
        public InternalTemplateService(RazorEngineCore service, ITemplateKey template)
        {
            Contract.Requires(service != null);
            Contract.Requires(template != null);

            _service  = service;
            _template = template;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initialises a new instance of <see cref="TemplateService"/>
        /// </summary>
        /// <param name="config">The template service configuration.</param>
        internal RazorEngineService(ITemplateServiceConfiguration config)
        {
            Contract.Requires(config != null);

            _config = config;
            //_core = new RazorEngineCore(config, this);
            _core_with_cache = new RazorEngineCoreWithCache(config, this);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initialises a new instance of <see cref="TemplateService"/>
        /// </summary>
        /// <param name="config">The template service configuration.</param>
        internal RazorEngineService(ITemplateServiceConfiguration config)
        {
            Contract.Requires(config != null);
            if (config.Debug && config.DisableTempFileLocking)
            {
                throw new InvalidOperationException("Debug && DisableTempFileLocking is not supported, you need to disable one of them. When Roslyn has been released and you are seeing this, open an issue as this might be possible now.");
            }

            _config = config;
            //_core = new RazorEngineCore(config, this);
            _core_with_cache = new RazorEngineCoreWithCache(config, this);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initialises a new instance of <see cref="TemplateService"/>
        /// </summary>
        /// <param name="config">The template service configuration.</param>
        internal RazorEngineService(ITemplateServiceConfiguration config)
        {
            Contract.Requires(config != null);
            if (config.Debug && config.DisableTempFileLocking)
            {
                throw new InvalidOperationException("Debug && DisableTempFileLocking is not supported, you need to disable one of them. When Roslyn has been released and you are seeing this, open an issue as this might be possible now.");
            }

            _config = config;
            //_core = new RazorEngineCore(config, this);
            _core_with_cache = new RazorEngineCoreWithCache(config, this);
        }