Skip to content

Commit 13c9926

Browse files
Document exceptionHandler arguments
1 parent 46b45b3 commit 13c9926

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

Diff for: src/React.AspNet/HtmlHelperExtensions.cs

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ private static IReactEnvironment Environment
5656
/// <param name="clientOnly">Skip rendering server-side and only output client-side initialisation code. Defaults to <c>false</c></param>
5757
/// <param name="serverOnly">Skip rendering React specific data-attributes during server side rendering. Defaults to <c>false</c></param>
5858
/// <param name="containerClass">HTML class(es) to set on the container tag</param>
59+
/// <param name="exceptionHandler">A custom exception handler that will be called if a component throws during a render. Args: (Exception ex, string componentName, string containerId)</param>
5960
/// <returns>The component's HTML</returns>
6061
public static IHtmlString React<T>(
6162
this IHtmlHelper htmlHelper,
@@ -102,6 +103,7 @@ public static IHtmlString React<T>(
102103
/// <param name="containerId">ID to use for the container HTML tag. Defaults to an auto-generated ID</param>
103104
/// <param name="clientOnly">Skip rendering server-side and only output client-side initialisation code. Defaults to <c>false</c></param>
104105
/// <param name="containerClass">HTML class(es) to set on the container tag</param>
106+
/// <param name="exceptionHandler">A custom exception handler that will be called if a component throws during a render. Args: (Exception ex, string componentName, string containerId)</param>
105107
/// <returns>The component's HTML</returns>
106108
public static IHtmlString ReactWithInit<T>(
107109
this IHtmlHelper htmlHelper,

Diff for: src/React.Core/IReactComponent.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
8-
*/
9-
8+
*/
9+
1010
using System;
1111

1212
namespace React
13-
{
13+
{
1414
/// <summary>
1515
/// Represents a React JavaScript component.
1616
/// </summary>
@@ -46,8 +46,8 @@ public interface IReactComponent
4646
/// return the rendered HTML.
4747
/// </summary>
4848
/// <param name="renderContainerOnly">Only renders component container. Used for client-side only rendering.</param>
49-
/// <param name="renderServerOnly">Only renders the common HTML mark up and not any React specific data attributes. Used for server-side only rendering.</param>
50-
/// <param name="exceptionHandler"></param>
49+
/// <param name="renderServerOnly">Only renders the common HTML mark up and not any React specific data attributes. Used for server-side only rendering.</param>
50+
/// <param name="exceptionHandler">A custom exception handler that will be called if a component throws during a render. Args: (Exception ex, string componentName, string containerId)</param>
5151
/// <returns>HTML</returns>
5252
string RenderHtml(bool renderContainerOnly = false, bool renderServerOnly = false, Action<Exception, string, string> exceptionHandler = null);
5353

Diff for: src/React.Core/ReactComponent.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
8-
*/
9-
8+
*/
9+
1010
using System;
1111
using System.Linq;
1212
using System.Text.RegularExpressions;
@@ -15,7 +15,7 @@
1515
using React.Exceptions;
1616

1717
namespace React
18-
{
18+
{
1919
/// <summary>
2020
/// Represents a React JavaScript component.
2121
/// </summary>
@@ -106,8 +106,8 @@ public ReactComponent(IReactEnvironment environment, IReactSiteConfiguration con
106106
/// return the rendered HTML.
107107
/// </summary>
108108
/// <param name="renderContainerOnly">Only renders component container. Used for client-side only rendering.</param>
109-
/// <param name="renderServerOnly">Only renders the common HTML mark up and not any React specific data attributes. Used for server-side only rendering.</param>
110-
/// <param name="exceptionHandler"></param>
109+
/// <param name="renderServerOnly">Only renders the common HTML mark up and not any React specific data attributes. Used for server-side only rendering.</param>
110+
/// <param name="exceptionHandler">A custom exception handler that will be called if a component throws during a render. Args: (Exception ex, string componentName, string containerId)</param>
111111
/// <returns>HTML</returns>
112112
public virtual string RenderHtml(bool renderContainerOnly = false, bool renderServerOnly = false, Action<Exception, string, string> exceptionHandler = null)
113113
{

0 commit comments

Comments
 (0)