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

            _service = service;
            _template = template;
        }
        /// <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);
        }
Exemple #3
0
        public InternalTemplateService(RazorEngineCore service, ITemplateKey template)
        {
            Contract.Requires(service != null);
            Contract.Requires(template != null);

            _service  = service;
            _template = template;
        }
        /// <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);
        }
Exemple #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);
        }
        /// <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);
        }