Skip to content

Commit

Permalink
Rename StartBrowserApp-like methods to end with "Async" suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkatz6 committed Feb 15, 2023
1 parent 49a6cbd commit 696c523
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion samples/ControlCatalog.Browser.Blazor/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static async Task Main(string[] args)
public static async Task StartAvaloniaApp()
{
await AppBuilder.Configure<ControlCatalog.App>()
.StartBlazorApp();
.StartBlazorAppAsync();
}

public static WebAssemblyHostBuilder CreateHostBuilder(string[] args)
Expand Down
2 changes: 1 addition & 1 deletion samples/ControlCatalog.Browser/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ await BuildAvaloniaApp()
{
ControlCatalog.Pages.EmbedSample.Implementation = new EmbedSampleWeb();
})
.StartBrowserApp("out");
.StartBrowserAppAsync("out");
}

// Example without a ISingleViewApplicationLifetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class BlazorAppBuilder
/// </summary>
/// <param name="builder">Application builder.</param>
/// <param name="options">Browser backend specific options.</param>
public static async Task StartBlazorApp(this AppBuilder builder, BrowserPlatformOptions? options = null)
public static async Task StartBlazorAppAsync(this AppBuilder builder, BrowserPlatformOptions? options = null)
{
options ??= new BrowserPlatformOptions();
options.FrameworkAssetPathResolver ??= filePath => $"/_content/Avalonia.Browser.Blazor/{filePath}";
Expand Down
6 changes: 3 additions & 3 deletions src/Browser/Avalonia.Browser/BrowserAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class BrowserAppBuilder
/// <param name="builder">Application builder.</param>
/// <param name="mainDivId">ID of the html element where avalonia content should be rendered.</param>
/// <param name="options">Browser backend specific options.</param>
public static async Task StartBrowserApp(this AppBuilder builder, string mainDivId, BrowserPlatformOptions? options = null)
public static async Task StartBrowserAppAsync(this AppBuilder builder, string mainDivId, BrowserPlatformOptions? options = null)
{
if (mainDivId is null)
{
Expand All @@ -46,9 +46,9 @@ public static async Task StartBrowserApp(this AppBuilder builder, string mainDiv
/// <param name="options">Browser backend specific options.</param>
/// <remarks>
/// This method doesn't creates any avalonia views to be rendered. To do so create an <see cref="AvaloniaView"/> object.
/// Alternatively, you can call <see cref="StartBrowserApp"/> method instead of <see cref="SetupBrowserApp"/>.
/// Alternatively, you can call <see cref="StartBrowserAppAsync"/> method instead of <see cref="SetupBrowserAppAsync"/>.
/// </remarks>
public static async Task SetupBrowserApp(this AppBuilder builder, BrowserPlatformOptions? options = null)
public static async Task SetupBrowserAppAsync(this AppBuilder builder, BrowserPlatformOptions? options = null)
{
builder = await PreSetupBrowser(builder, options);

Expand Down

0 comments on commit 696c523

Please sign in to comment.