36 instantiations of PersistentComponentState
Microsoft.AspNetCore.Components (1)
PersistentState\ComponentStatePersistenceManager.cs (1)
29State = new PersistentComponentState(_currentState, _registeredCallbacks, _registeredRestoringCallbacks);
Microsoft.AspNetCore.Components.Tests (35)
PersistentState\PersistentComponentStateTest.cs (15)
18var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 36var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 53var applicationState = new PersistentComponentState(currentState, [], []) 66var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 86var applicationState = new PersistentComponentState(currentState, [], []) 105var applicationState = new PersistentComponentState(currentState, [], []) 122var applicationState = new PersistentComponentState(currentState, [], []) 141var applicationState = new PersistentComponentState(currentState, [], []) 161var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 179var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 197var applicationState = new PersistentComponentState(currentState, [], callbacks); 216var applicationState = new PersistentComponentState(currentState, [], callbacks); 235var applicationState = new PersistentComponentState(currentState, [], callbacks); 254var applicationState = new PersistentComponentState(currentState, [], callbacks); 273var applicationState = new PersistentComponentState(currentState, [], callbacks);
PersistentState\PersistentServicesRegistryTest.cs (1)
39var componentState = new PersistentComponentState(testStore.State, [], []);
PersistentStateValueProviderKeyResolverTests.cs (2)
90var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 145var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []);
PersistentStateValueProviderTests.cs (3)
20var state = new PersistentComponentState( 51var state = new PersistentComponentState( 77var state = new PersistentComponentState(
PersistentValueProviderComponentSubscriptionTests.cs (14)
23var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 45var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 70var state = new PersistentComponentState(initialState, [], []); 99var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 130var state = new PersistentComponentState(initialState, [], []); 160var state = new PersistentComponentState(initialState, [], []); 189var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 210var state = new PersistentComponentState(initialState, [], []); 297var state = new PersistentComponentState(initialState, [], []); 337var state = new PersistentComponentState(initialState, [], []); 397var state = new PersistentComponentState(initialState, [], []); 649var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 672var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 695var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []);
75 references to PersistentComponentState
BasicTestApp (2)
PreserveStateService.cs (2)
11private readonly PersistentComponentState _componentApplicationState; 16public PreserveStateService(PersistentComponentState componentApplicationState)
Microsoft.AspNetCore.Components (12)
PersistentComponentState.cs (2)
164/// and removed from the <see cref="PersistentComponentState"/>. 208/// and removed from the <see cref="PersistentComponentState"/>.
PersistentState\ComponentStatePersistenceManager.cs (1)
52public PersistentComponentState State { get; }
PersistentState\PersistentServicesRegistry.cs (4)
50internal void RegisterForPersistence(PersistentComponentState state) 101private static void PersistInstanceState(object instance, Type type, PersistentComponentState state) 119private void UpdateRegistrations(PersistentComponentState state) 128private static void RestoreInstanceState(object instance, Type type, PersistentComponentState state)
PersistentState\PersistentStateProviderServiceCollectionExtensions.cs (2)
10/// Enables component parameters to be supplied from <see cref="PersistentComponentState"/> with <see cref="PersistentStateAttribute"/>. 15/// Enables component parameters to be supplied from <see cref="PersistentComponentState"/> with <see cref="PersistentStateAttribute"/>.
PersistentState\PersistentStateValueProvider.cs (1)
10internal sealed partial class PersistentStateValueProvider(PersistentComponentState state, ILogger<PersistentStateValueProvider> logger, IServiceProvider serviceProvider) : ICascadingValueSupplier
PersistentState\PersistentValueProviderComponentSubscription.cs (2)
36private readonly PersistentComponentState _state; 52PersistentComponentState state,
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
EndpointHtmlRendererTest.cs (12)
1415var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1469var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1507var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1537var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1602var state = httpContext.RequestServices.GetRequiredService<PersistentComponentState>(); 1746[Inject] public PersistentComponentState State { get; set; } 1857services.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
RazorComponentResultTest.cs (1)
467.AddSingleton<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State)
Microsoft.AspNetCore.Components.Tests (37)
PersistentState\PersistentComponentStateTest.cs (15)
18var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 36var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 53var applicationState = new PersistentComponentState(currentState, [], []) 66var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 86var applicationState = new PersistentComponentState(currentState, [], []) 105var applicationState = new PersistentComponentState(currentState, [], []) 122var applicationState = new PersistentComponentState(currentState, [], []) 141var applicationState = new PersistentComponentState(currentState, [], []) 161var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 179var applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 197var applicationState = new PersistentComponentState(currentState, [], callbacks); 216var applicationState = new PersistentComponentState(currentState, [], callbacks); 235var applicationState = new PersistentComponentState(currentState, [], callbacks); 254var applicationState = new PersistentComponentState(currentState, [], callbacks); 273var applicationState = new PersistentComponentState(currentState, [], callbacks);
PersistentState\PersistentServicesRegistryTest.cs (1)
39var componentState = new PersistentComponentState(testStore.State, [], []);
PersistentStateValueProviderKeyResolverTests.cs (2)
90var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 145var newState = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []);
PersistentStateValueProviderTests.cs (4)
20var state = new PersistentComponentState( 51var state = new PersistentComponentState( 77var state = new PersistentComponentState( 102private static void InitializeState(PersistentComponentState state, List<(ComponentState componentState, string propertyName, string value)> items)
PersistentValueProviderComponentSubscriptionTests.cs (15)
23var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 45var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 70var state = new PersistentComponentState(initialState, [], []); 99var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 130var state = new PersistentComponentState(initialState, [], []); 160var state = new PersistentComponentState(initialState, [], []); 189var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 210var state = new PersistentComponentState(initialState, [], []); 245var state = manager.State; 297var state = new PersistentComponentState(initialState, [], []); 337var state = new PersistentComponentState(initialState, [], []); 397var state = new PersistentComponentState(initialState, [], []); 649var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 672var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []); 695var state = new PersistentComponentState(new Dictionary<string, byte[]>(), [], []);
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"/>
Microsoft.AspNetCore.Components.WebView (1)
ComponentsWebViewServiceCollectionExtensions.cs (1)
33services.TryAddScoped<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);
Microsoft.AspNetCore.Components.WebView.Test (3)
ComponentsWebViewServiceCollectionExtensionsTests.cs (3)
24var persistentState = serviceProvider.GetService<PersistentComponentState>(); 42var persistentStateDescriptor = services.FirstOrDefault(s => s.ServiceType == typeof(PersistentComponentState));