Esempio n. 1
0
        public static void Reload()
        {
            if (!_isInitialized)
            {
                throw new ApplicationException("Not yet initialized. Can't reload.");
            }

            var _webpackBuilder = new WebpackBuilder(_httpServerUtility);

            s_instance     = _webpackBuilder.Build(_config);
            _isInitialized = true;
        }
Esempio n. 2
0
        public static void Initialize(HttpServerUtilityBase httpServerUtility, WebpackConfig config)
        {
            if (_isInitialized)
            {
                throw new ApplicationException("Already initialized");
            }

            _httpServerUtility = httpServerUtility ?? throw new ArgumentNullException(nameof(httpServerUtility));
            _config            = config;
            var _webpackBuilder = new WebpackBuilder(_httpServerUtility);

            s_instance     = _webpackBuilder.Build(_config);
            _isInitialized = true;
        }