-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Prepare Browser Refresh Server for sharing #50553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
739dbe9
Unindent
tmat 24689ac
Minor improvements to browser refresh logging
tmat ba0fd12
Simplify app model inference, add WebApplicationAppModel.
tmat 3060d4d
Better logging
tmat 508917d
Separate BrowserLauncher and BrowserConnector
tmat 8b9f221
Renames
tmat 170ddb5
Comments
tmat b5fb8a9
Cancellation
tmat fcca0fb
BrowserLauncherTests
tmat ca49ca9
Env vars
tmat 5bc60b5
Fix tests
tmat bca735b
Move LoggingUtilities
tmat f40db3a
EnvOptions
tmat 7c0493e
Fix BRS cancellation
tmat d9536d4
Move BRS from RunningProject to HotReloadClients
tmat da751fa
Add HotReloadClient.ConfigureLaunchEnvironment
tmat df90263
Add BrowserRefreshServer abstraction to Client package
tmat 04c9bdf
Move WebAssemblyHotReloadClient to shared package
tmat 2190db8
Cleanup
tmat 1e0e54c
Share Kestrel-based BRS
tmat 5739efc
Simplify
tmat 635467e
Refactoring and tests
tmat 27ebc87
Update assembly version of Microsoft.Bcl.AsyncInterfaces available in…
tmat 04af27e
Pending tasks for suspended WASM processes
tmat 4e970f1
Simplify dispose
tmat 6718b0f
Cleanup
tmat 727929b
Update SBMSBuildSdkResolver dependencies
tmat 65f4b9d
Fix TFMs
tmat 43a6b90
Fix
tmat 50f4a80
Fix env utils
tmat 4ea877b
Move pending update handling to base class
tmat 201c641
Feedback
tmat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| #nullable enable | ||
|
|
||
| using Microsoft.Extensions.Logging; | ||
|
|
||
| namespace Microsoft.DotNet.HotReload; | ||
|
|
||
| internal readonly record struct LogEvent(EventId Id, LogLevel Level, string Message); | ||
|
|
||
| internal static class LogEvents | ||
| { | ||
| // Non-shared event ids start at 0. | ||
| private static int s_id = 1000; | ||
|
|
||
| private static LogEvent Create(LogLevel level, string message) | ||
| => new(new EventId(s_id++), level, message); | ||
|
|
||
| public static void Log(this ILogger logger, LogEvent logEvent, params object[] args) | ||
| => logger.Log(logEvent.Level, logEvent.Id, logEvent.Message, args); | ||
|
|
||
| public static readonly LogEvent UpdatesApplied = Create(LogLevel.Debug, "Updates applied: {0} out of {1}."); | ||
| public static readonly LogEvent Capabilities = Create(LogLevel.Debug, "Capabilities: '{1}'."); | ||
| public static readonly LogEvent HotReloadSucceeded = Create(LogLevel.Information, "Hot reload succeeded."); | ||
| public static readonly LogEvent RefreshingBrowser = Create(LogLevel.Debug, "Refreshing browser."); | ||
| public static readonly LogEvent ReloadingBrowser = Create(LogLevel.Debug, "Reloading browser."); | ||
| public static readonly LogEvent NoBrowserConnected = Create(LogLevel.Debug, "No browser is connected."); | ||
| public static readonly LogEvent FailedToReceiveResponseFromConnectedBrowser = Create(LogLevel.Debug, "Failed to receive response from a connected browser."); | ||
| public static readonly LogEvent UpdatingDiagnostics = Create(LogLevel.Debug, "Updating diagnostics."); | ||
| public static readonly LogEvent SendingStaticAssetUpdateRequest = Create(LogLevel.Debug, "Sending static asset update request to connected browsers: '{0}'."); | ||
| public static readonly LogEvent RefreshServerRunningAt = Create(LogLevel.Debug, "Refresh server running at {0}."); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.