9 instantiations of ComponentStatePersistenceManager
Microsoft.AspNetCore.Components.Tests (9)
Lifetime\ComponentStatePersistenceManagerTest.cs (9)
28var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 48var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 62var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 84var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 109var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 129var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 157var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 191var lifetime = new ComponentStatePersistenceManager(logger); 217var lifetime = new ComponentStatePersistenceManager(logger);
63 references to ComponentStatePersistenceManager
Microsoft.AspNetCore.Components (8)
Infrastructure\ComponentStatePersistenceManager.cs (7)
15private readonly ILogger<ComponentStatePersistenceManager> _logger; 21/// Initializes a new instance of <see cref="ComponentStatePersistenceManager"/>. 23public ComponentStatePersistenceManager(ILogger<ComponentStatePersistenceManager> logger) 30/// Gets the <see cref="ComponentStatePersistenceManager"/> associated with the <see cref="ComponentStatePersistenceManager"/>. 162static Task ExecuteCallback(Func<Task> callback, ILogger<ComponentStatePersistenceManager> logger) 182static async Task Awaited(Task task, ILogger<ComponentStatePersistenceManager> logger)
PersistingComponentStateSubscription.cs (1)
9/// Represents a subscription to the <c>OnPersisting</c> callback that <see cref="ComponentStatePersistenceManager"/> callback will trigger
Microsoft.AspNetCore.Components.Endpoints (8)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (2)
64services.TryAddScoped<ComponentStatePersistenceManager>(); 65services.TryAddScoped<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
Rendering\EndpointHtmlRenderer.cs (2)
115var componentApplicationLifetime = httpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>();
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (4)
23var manager = _httpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 136var manager = _httpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>();
Microsoft.AspNetCore.Components.Endpoints.Tests (9)
EndpointHtmlRendererTest.cs (6)
1673services.AddSingleton<ILogger<ComponentStatePersistenceManager>, NullLogger<ComponentStatePersistenceManager>>(); 1674services.AddSingleton<ComponentStatePersistenceManager>(); 1675services.AddSingleton(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State); 1679services.AddSingleton<ComponentStatePersistenceManager>(); 1680services.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
RazorComponentResultTest.cs (3)
463.AddSingleton<ComponentStatePersistenceManager>() 466.AddSingleton<ComponentStatePersistenceManager>() 467.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State)
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitFactory.cs (2)
71var appLifetime = scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>();
Circuits\CircuitHost.cs (2)
760var appLifetime = _scope.ServiceProvider.GetRequiredService<ComponentStatePersistenceManager>();
Microsoft.AspNetCore.Components.Tests (18)
Lifetime\ComponentStatePersistenceManagerTest.cs (18)
28var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 48var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 62var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 84var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 109var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 129var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 157var lifetime = new ComponentStatePersistenceManager(NullLogger<ComponentStatePersistenceManager>.Instance); 188var logger = loggerFactory.CreateLogger<ComponentStatePersistenceManager>(); 191var lifetime = new ComponentStatePersistenceManager(logger); 214var logger = loggerFactory.CreateLogger<ComponentStatePersistenceManager>(); 217var lifetime = new ComponentStatePersistenceManager(logger);
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\EditFormTest.cs (2)
23services.AddSingleton<ComponentStatePersistenceManager>(); 24services.AddSingleton(services => services.GetRequiredService<ComponentStatePersistenceManager>().State);
Microsoft.AspNetCore.Components.WebAssembly (4)
Hosting\WebAssemblyHost.cs (2)
134var manager = Services.GetRequiredService<ComponentStatePersistenceManager>();
Hosting\WebAssemblyHostBuilder.cs (2)
306Services.AddSingleton<ComponentStatePersistenceManager>(); 307Services.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (10)
ComponentTagHelperTest.cs (1)
91.AddScoped<ComponentStatePersistenceManager>()
PersistComponentStateTagHelperTest.cs (9)
88var manager = tagHelper.ViewContext.HttpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 118var manager = tagHelper.ViewContext.HttpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 147var manager = tagHelper.ViewContext.HttpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 200var manager = tagHelper.ViewContext.HttpContext.RequestServices.GetRequiredService<ComponentStatePersistenceManager>(); 263.AddScoped<ComponentStatePersistenceManager>()