Ejemplo n.º 1
0
 public ReactRouterComponent(
     ReactConfiguration configuration,
     IReactIdGenerator reactIdGenerator,
     IJavaScriptEngineFactory javaScriptEngineFactory,
     IComponentNameInvalidator componentNameInvalidator) : base(
         configuration,
         reactIdGenerator,
         javaScriptEngineFactory,
         componentNameInvalidator)
 {
 }
Ejemplo n.º 2
0
        protected ReactBaseComponent(
            ReactConfiguration configuration,
            IReactIdGenerator reactIdGenerator,
            IJavaScriptEngineFactory javaScriptEngineFactory,
            IComponentNameInvalidator componentNameInvalidator)
        {
            _configuration            = configuration;
            _reactIdGenerator         = reactIdGenerator;
            _javaScriptEngineFactory  = javaScriptEngineFactory;
            _componentNameInvalidator = componentNameInvalidator;

            ExceptionHandler = _configuration.ExceptionHandler;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReactEnvironment"/> class.
 /// </summary>
 /// <param name="engineFactory">The JavaScript engine factory</param>
 /// <param name="config">The site-wide configuration</param>
 /// <param name="cache">The cache to use for JSX compilation</param>
 /// <param name="fileSystem">File system wrapper</param>
 /// <param name="fileCacheHash">Hash algorithm for file-based cache</param>
 public ReactEnvironment(
     IJavaScriptEngineFactory engineFactory,
     IReactSiteConfiguration config,
     ICache cache,
     IFileSystem fileSystem,
     IFileCacheHash fileCacheHash
     )
 {
     _engineFactory  = engineFactory;
     _config         = config;
     _cache          = cache;
     _fileSystem     = fileSystem;
     _fileCacheHash  = fileCacheHash;
     _jsxTransformer = new Lazy <IJsxTransformer>(() =>
                                                  new JsxTransformer(this, _cache, _fileSystem, _fileCacheHash, _config)
                                                  );
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReactEnvironment"/> class.
 /// </summary>
 /// <param name="engineFactory">The JavaScript engine factory</param>
 /// <param name="config">The site-wide configuration</param>
 /// <param name="cache">The cache to use for JSX compilation</param>
 /// <param name="fileSystem">File system wrapper</param>
 /// <param name="fileCacheHash">Hash algorithm for file-based cache</param>
 public ReactEnvironment(
     IJavaScriptEngineFactory engineFactory,
     IReactSiteConfiguration config,
     ICache cache,
     IFileSystem fileSystem,
     IFileCacheHash fileCacheHash
     )
 {
     _engineFactory    = engineFactory;
     _config           = config;
     _cache            = cache;
     _fileSystem       = fileSystem;
     _fileCacheHash    = fileCacheHash;
     _babelTransformer = new Lazy <IBabel>(() =>
                                           new Babel(this, _cache, _fileSystem, _fileCacheHash, _config)
                                           );
     _engineFromPool = new Lazy <IJsEngine>(() => _engineFactory.GetEngine());
 }