/// <summary>
		/// Initializes a new instance of the <see cref="ReactSiteConfiguration"/> class.
		/// </summary>
		public ReactSiteConfiguration()
		{
			BabelConfig = new BabelConfig();
			ReuseJavaScriptEngines = true;
			AllowMsieEngine = true;
			LoadBabel = true;
			LoadReact = true;
			JsonSerializerSettings = new JsonSerializerSettings
			{
				StringEscapeHandling = StringEscapeHandling.EscapeHtml
			};
		}
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReactSiteConfiguration"/> class.
 /// </summary>
 public ReactSiteConfiguration()
 {
     BabelConfig            = new BabelConfig();
     ReuseJavaScriptEngines = true;
     AllowMsieEngine        = true;
     LoadBabel = true;
     LoadReact = true;
     JsonSerializerSettings = new JsonSerializerSettings
     {
         StringEscapeHandling = StringEscapeHandling.EscapeHtml
     };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ReactSiteConfiguration"/> class.
 /// </summary>
 public ReactSiteConfiguration()
 {
     BabelConfig                   = new BabelConfig();
     ReuseJavaScriptEngines        = true;
     AllowJavaScriptPrecompilation = false;
     LoadBabel = true;
     LoadReact = true;
     JsonSerializerSettings = new JsonSerializerSettings
     {
         StringEscapeHandling = StringEscapeHandling.EscapeHtml
     };
     UseDebugReact          = false;
     UseServerSideRendering = true;
     ExceptionHandler       = (Exception ex, string ComponentName, string ContainerId) =>
                              throw new ReactServerRenderingException(string.Format(
                                                                          "Error while rendering \"{0}\" to \"{2}\": {1}",
                                                                          ComponentName,
                                                                          ex.Message,
                                                                          ContainerId
                                                                          ), ex);
 }
示例#4
0
 /// <summary>
 /// Sets the Babel configuration to use.
 /// </summary>
 /// <returns>The configuration, for chaining</returns>
 public IReactSiteConfiguration SetBabelConfig(BabelConfig value)
 {
     BabelConfig = value;
     return(this);
 }
		/// <summary>
		/// Sets the Babel configuration to use.
		/// </summary>
		/// <returns>The configuration, for chaining</returns>
		public IReactSiteConfiguration SetBabelConfig(BabelConfig value)
		{
			BabelConfig = value;
			return this;
		}