1 instantiation of PersistentComponentState
Microsoft.AspNetCore.Components (1)
PersistentState\ComponentStatePersistenceManager.cs (1)
27State = new PersistentComponentState(_currentState, _registeredCallbacks);
55 references to PersistentComponentState
BasicTestApp (2)
PreserveStateService.cs (2)
11private readonly PersistentComponentState _componentApplicationState; 16public PreserveStateService(PersistentComponentState componentApplicationState)
Microsoft.AspNetCore.Components (10)
PersistentComponentState.cs (1)
117/// and removed from the <see cref="PersistentComponentState"/>.
PersistentState\ComponentStatePersistenceManager.cs (1)
50public PersistentComponentState State { get; }
PersistentState\PersistentServicesRegistry.cs (5)
41internal void RegisterForPersistence(PersistentComponentState state) 81private static void PersistInstanceState(object instance, Type type, PersistentComponentState state) 99internal void Restore(PersistentComponentState state) 110private void RestoreRegistrationsIfAvailable(PersistentComponentState state) 129private static void RestoreInstanceState(object instance, Type type, PersistentComponentState state)
SupplyParameterFromPersistentComponentStateProviderServiceCollectionExtensions.cs (2)
10/// Enables component parameters to be supplied from <see cref="PersistentComponentState"/> with <see cref="SupplyParameterFromPersistentComponentStateAttribute"/>. 15/// Enables component parameters to be supplied from <see cref="PersistentComponentState"/> with <see cref="SupplyParameterFromPersistentComponentStateAttribute"/>..
SupplyParameterFromPersistentComponentStateValueProvider.cs (1)
18internal sealed class SupplyParameterFromPersistentComponentStateValueProvider(PersistentComponentState state) : ICascadingValueSupplier
Microsoft.AspNetCore.Components.Endpoints (2)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
17private readonly PersistentComponentState _state; 21public ResourceCollectionProvider(PersistentComponentState state, IJSRuntime jsRuntime)
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
EndpointHtmlRendererTest.cs (12)
1377var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1431var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1469var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1499var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1564var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1708[Inject] public PersistentComponentState State { get; set; } 1796services.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
RazorComponentResultTest.cs (1)
467.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State)
Microsoft.AspNetCore.Components.Tests (19)
PersistentState\ComponentApplicationStateTest.cs (10)
14var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 32var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 49var applicationState = new PersistentComponentState(currentState, []) 62var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 82var applicationState = new PersistentComponentState(currentState, []) 101var applicationState = new PersistentComponentState(currentState, []) 118var applicationState = new PersistentComponentState(currentState, []) 137var applicationState = new PersistentComponentState(currentState, []) 157var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 175var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
PersistentState\PersistentServicesRegistryTest.cs (1)
37var componentState = new PersistentComponentState(testStore.State, []);
SupplyParameterFromPersistentComponentStateValueProviderTests.cs (8)
23var state = new PersistentComponentState( 52var state = new PersistentComponentState( 74var state = new PersistentComponentState( 123var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 161var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 202var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 275var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []); 434private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
17private readonly PersistentComponentState _state; 21public ResourceCollectionProvider(PersistentComponentState state, IJSRuntime jsRuntime)
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
AuthenticationStateSerializationOptions.cs (2)
12/// to the WebAssembly client using <see cref="PersistentComponentState"/>. 32/// for JSON serialization to the client using <see cref="PersistentComponentState"/>."/>
AuthenticationStateSerializer.cs (4)
15private readonly PersistentComponentState _state; 21public AuthenticationStateSerializer(PersistentComponentState persistentComponentState, IOptions<AuthenticationStateSerializationOptions> options) 32throw new InvalidOperationException($"{nameof(SetAuthenticationState)} must be called before the {nameof(PersistentComponentState)}.{nameof(PersistentComponentState.RegisterOnPersisting)} callback.");
WebAssemblyRazorComponentsBuilderExtensions.cs (1)
34/// Serializes the <see cref="AuthenticationState"/> returned by the server-side <see cref="AuthenticationStateProvider"/> using <see cref="PersistentComponentState"/>