Skip to content

Commit

Permalink
#59 - added Locator.RegisterResolverCallbackChanged to support Splat'…
Browse files Browse the repository at this point in the history
…s Locator being changed to some other DI framework (#60)
  • Loading branch information
gentledepp authored Dec 4, 2024
1 parent 934a6ed commit 27b1fe4
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 27b1fe4

Please sign in to comment.