private void Reconfigure() { IDisposable oldpool; using (var cfg = new ReactConfiguration()) { Configure(cfg); lock (this) { if (watcher != null) { watcher.StopNotify(); } oldpool = (IDisposable)_ReactPool; _ReactPool = cfg.GetReactPool(); watcher = cfg.Watcher; Preprocessor = cfg.PreprocessorFunction; Postprocessor = cfg.PostprocessorFunction; if (watcher != null) { watcher.StartNotify(this.Reconfigure); } } } if (oldpool != null) { oldpool.Dispose(); } }
public void EnumerateJsAndJsx(ReactConfiguration reactConfiguration) { foreach (var fn in System.IO.Directory.GetFiles(path, "*.js*")) { if (HasExtension(fn, "js")) { reactConfiguration.AddJs(fn); } if (HasExtension(fn, "jsx")) { reactConfiguration.AddJsx(fn); } } }