From 9810e5b3b838b7b629c2bd9e1b558cedcee8a5f4 Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Fri, 4 Sep 2020 09:35:35 -0500 Subject: [PATCH 1/5] Enhance Blazor start content --- .../fundamentals/additional-scenarios.md | 68 ++++++++++++++----- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/aspnetcore/blazor/fundamentals/additional-scenarios.md b/aspnetcore/blazor/fundamentals/additional-scenarios.md index 9e37e8192304..23589c196d0c 100644 --- a/aspnetcore/blazor/fundamentals/additional-scenarios.md +++ b/aspnetcore/blazor/fundamentals/additional-scenarios.md @@ -112,18 +112,52 @@ Blazor Server apps are set up by default to prerender the UI on the server befor Rendering server components from a static HTML page isn't supported. -## Configure the SignalR client for Blazor Server apps +## Manual start of the Blazor app *This section applies to Blazor Server.* -Configure the SignalR client used by Blazor Server apps in the `Pages/_Host.cshtml` file. Place a script that calls `Blazor.start` after the `_framework/blazor.server.js` script and inside the `` tag. +Configure the manual start of a Blazor Server app in the `Pages/_Host.cshtml` file: -### Logging +* Add an `autostart="false"` attribute to the ` + + +``` + +### Chain to the `Promise` that results from a manual start + +To perform additional tasks, such as JS interop initialization, use `then` to chain to the `Promise` that results from a manual Blazor app start: + +```cshtml + ... + + + + +``` + +### Configure the SignalR client + +#### Logging + +To configure SignalR client logging, pass in a configuration object (`configureSignalR`) that calls `configureLogging` with the log level on the client builder: ```cshtml ... @@ -148,10 +182,12 @@ The reconnection handler's circuit connection events can be modified for custom * To notify the user if the connection is dropped. * To perform logging (from the client) when a circuit is connected. -To modify the connection events: +To modify the connection events, register callbacks for the following connection changes: -* Add an `autostart="false"` attribute to the ` ``` From bed6de6b90c490bb744712c8291d6a9ebe04b42f Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Tue, 8 Sep 2020 06:44:04 -0500 Subject: [PATCH 2/5] Updates --- .../fundamentals/additional-scenarios.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/fundamentals/additional-scenarios.md b/aspnetcore/blazor/fundamentals/additional-scenarios.md index 23589c196d0c..b5abc3dd9f31 100644 --- a/aspnetcore/blazor/fundamentals/additional-scenarios.md +++ b/aspnetcore/blazor/fundamentals/additional-scenarios.md @@ -116,16 +116,20 @@ Rendering server components from a static HTML page isn't supported. *This section applies to Blazor Server.* -Configure the manual start of a Blazor Server app in the `Pages/_Host.cshtml` file: +Configure the manual start of a Blazor Server app's [SignalR circuit](xref:blazor/hosting-models#circuits) in the `Pages/_Host.cshtml` file: * Add an `autostart="false"` attribute to the ` @@ -142,6 +146,8 @@ To initialize the Blazor app when the document is ready: To perform additional tasks, such as JS interop initialization, use `then` to chain to the `Promise` that results from a manual Blazor app start: ```cshtml + + ... @@ -160,6 +166,8 @@ To perform additional tasks, such as JS interop initialization, use `then` to ch To configure SignalR client logging, pass in a configuration object (`configureSignalR`) that calls `configureLogging` with the log level on the client builder: ```cshtml + + ... @@ -190,6 +198,8 @@ To modify the connection events, register callbacks for the following connection **Both** `onConnectionDown` and `onConnectionUp` must be specified: ```cshtml + + ... @@ -209,6 +219,8 @@ To modify the connection events, register callbacks for the following connection To adjust the reconnection retry count and interval, set the number of retries (`maxRetries`) and period in milliseconds permitted for each retry attempt (`retryIntervalMilliseconds`): ```cshtml + + ... @@ -228,6 +240,8 @@ To adjust the reconnection retry count and interval, set the number of retries ( To hide the reconnection display, set the reconnection handler's `_reconnectionDisplay` to an empty object (`{}` or `new Object()`): ```cshtml + + ... From 7b3e5aaba591123d5f7c03ab11edaabf5424267f Mon Sep 17 00:00:00 2001 From: guardrex <1622880+guardrex@users.noreply.github.com> Date: Wed, 9 Sep 2020 08:28:35 -0500 Subject: [PATCH 3/5] Update --- aspnetcore/blazor/fundamentals/additional-scenarios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/fundamentals/additional-scenarios.md b/aspnetcore/blazor/fundamentals/additional-scenarios.md index b5abc3dd9f31..e0dbde41759a 100644 --- a/aspnetcore/blazor/fundamentals/additional-scenarios.md +++ b/aspnetcore/blazor/fundamentals/additional-scenarios.md @@ -121,7 +121,7 @@ Configure the manual start of a Blazor Server app's [SignalR circuit](xref:blazo * Add an `autostart="false"` attribute to the `