Skip to content
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

#59 - added Locator.RegisterResolverCallbackChanged to support Splat'… #60

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
#59 - added Locator.RegisterResolverCallbackChanged to support Splat'…
…s Locator being changed to some other DI framework
  • Loading branch information
gentledepp committed Dec 3, 2024
commit 5ab6f6c00499c28d7a8d399fc6df1739db4da386
4 changes: 2 additions & 2 deletions src/AvaloniaInside.Shell/AppBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace AvaloniaInside.Shell;
public static class AppBuilderExtensions
{
public static AppBuilder UseShell(this AppBuilder builder, Func<INavigationViewLocator>? viewLocatorFactory = null) =>
builder.AfterPlatformServicesSetup(_ =>
builder.AfterPlatformServicesSetup(_ => Locator.RegisterResolverCallbackChanged(() =>
{
if (Locator.CurrentMutable is null)
{
Expand Down Expand Up @@ -37,7 +37,7 @@ public static AppBuilder UseShell(this AppBuilder builder, Func<INavigationViewL
viewLocator
);
});
});
}));

public static AppBuilder UseShell(this AppBuilder builder, Func<NavigationNode, object> viewFactory)
=> builder.UseShell(() => new DelegateNavigationViewLocator(viewFactory));
Expand Down
Loading