Skip to content

Commit

Permalink
Delete PinnedScopeOptions. Getting scoped services from PinnedScope.S…
Browse files Browse the repository at this point in the history
…copedServices in PinnedScopeOwningComponentBase is now the default behavior.
  • Loading branch information
inversionhourglass committed Dec 13, 2024
1 parent f6cae60 commit d08ac94
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 65 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ public IServiceProvider ServiceProvider
/// <inheritdoc />
public IServiceScope Create()
{
var options = ServiceProvider.GetService<IOptions<PinnedScopeOptions>>();
if (options != null && options.Value.UseOwningScopedServices)
{
return new FactoryScope(() => ScopedServices);
}
return new FoolScope(ServiceProvider);
return new FactoryScope(() => ScopedServices);
}

Task IHandleEvent.HandleEventAsync(EventCallbackWorkItem callback, object? arg)
Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion test/TestAssemblies/BlazorServerApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static void Main(string[] args)
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();

builder.Host.UsePinnedScopeServiceProvider().UseOwningScopedServices();
builder.Host.UsePinnedScopeServiceProvider();

var app = builder.Build();

Expand Down

0 comments on commit d08ac94

Please sign in to comment.