1 instantiation of PersistentComponentState
Microsoft.AspNetCore.Components (1)
PersistentState\ComponentStatePersistenceManager.cs (1)
27
State = new
PersistentComponentState
(_currentState, _registeredCallbacks);
51 references to PersistentComponentState
BasicTestApp (2)
PreserveStateService.cs (2)
11
private readonly
PersistentComponentState
_componentApplicationState;
16
public PreserveStateService(
PersistentComponentState
componentApplicationState)
Microsoft.AspNetCore.Components (10)
PersistentComponentState.cs (1)
117
/// and removed from the <see cref="
PersistentComponentState
"/>.
PersistentState\ComponentStatePersistenceManager.cs (1)
50
public
PersistentComponentState
State { get; }
PersistentState\PersistentServicesRegistry.cs (5)
41
internal void RegisterForPersistence(
PersistentComponentState
state)
81
private static void PersistInstanceState(object instance, Type type,
PersistentComponentState
state)
99
internal void Restore(
PersistentComponentState
state)
110
private void RestoreRegistrationsIfAvailable(
PersistentComponentState
state)
129
private 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)
18
internal sealed class SupplyParameterFromPersistentComponentStateValueProvider(
PersistentComponentState
state) : ICascadingValueSupplier
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
EndpointHtmlRendererTest.cs (12)
1398
var
state = httpContext.RequestServices.GetRequiredService<
PersistentComponentState
>();
1452
var
state = httpContext.RequestServices.GetRequiredService<
PersistentComponentState
>();
1490
var
state = httpContext.RequestServices.GetRequiredService<
PersistentComponentState
>();
1520
var
state = httpContext.RequestServices.GetRequiredService<
PersistentComponentState
>();
1585
var
state = httpContext.RequestServices.GetRequiredService<
PersistentComponentState
>();
1729
[Inject] public
PersistentComponentState
State { get; set; }
1834
services.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)
14
var
applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
32
var
applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
49
var
applicationState = new PersistentComponentState(currentState, [])
62
var
applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
82
var
applicationState = new PersistentComponentState(currentState, [])
101
var
applicationState = new PersistentComponentState(currentState, [])
118
var
applicationState = new PersistentComponentState(currentState, [])
137
var
applicationState = new PersistentComponentState(currentState, [])
157
var
applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
175
var
applicationState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
PersistentState\PersistentServicesRegistryTest.cs (1)
37
var
componentState = new PersistentComponentState(testStore.State, []);
SupplyParameterFromPersistentComponentStateValueProviderTests.cs (8)
23
var
state = new PersistentComponentState(
52
var
state = new PersistentComponentState(
74
var
state = new PersistentComponentState(
123
var
newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
161
var
newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
202
var
newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
275
var
newState = new PersistentComponentState(new Dictionary<string, byte[]>(), []);
434
private static void InitializeState(
PersistentComponentState
state, List<(ComponentState componentState, string propertyName, string value)> items)
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)
15
private readonly
PersistentComponentState
_state;
21
public AuthenticationStateSerializer(
PersistentComponentState
persistentComponentState, IOptions<AuthenticationStateSerializationOptions> options)
32
throw 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
"/>