3 instantiations of RestoreContext
Microsoft.AspNetCore.Components (3)
PersistentState\RestoreContext.cs (3)
18public static RestoreContext InitialValue { get; } = new RestoreContext(true, false, false); 24public static RestoreContext LastSnapshot { get; } = new RestoreContext(false, true, false); 30public static RestoreContext ValueUpdate { get; } = new RestoreContext(false, false, true);
22 references to RestoreContext
Microsoft.AspNetCore.Components (14)
PersistentComponentState.cs (4)
34internal RestoreContext CurrentContext { get; private set; } = RestoreContext.InitialValue; 36internal void InitializeExistingState(IDictionary<string, byte[]> existingState, RestoreContext context) 243internal void UpdateExistingState(IDictionary<string, byte[]> state, RestoreContext context)
PersistentState\ComponentStatePersistenceManager.cs (4)
61await RestoreStateAsync(store, RestoreContext.InitialValue); 68/// <param name="context">The <see cref="RestoreContext"/> that provides additional context for the restoration.</param> 70public async Task RestoreStateAsync(IPersistentComponentStateStore store, RestoreContext context) 76if (context != RestoreContext.ValueUpdate)
PersistentState\RestoreContext.cs (6)
16/// Gets a <see cref="RestoreContext"/> that indicates the host is restoring initial values. 18public static RestoreContext InitialValue { get; } = new RestoreContext(true, false, false); 21/// Gets a <see cref="RestoreContext"/> that indicates the host is restoring the last snapshot 24public static RestoreContext LastSnapshot { get; } = new RestoreContext(false, true, false); 27/// Gets the <see cref="RestoreContext"/> that indicates the host is providing an external state 30public static RestoreContext ValueUpdate { get; } = new RestoreContext(false, false, true);
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.cs (1)
139await componentApplicationLifetime.RestoreStateAsync(new PrerenderComponentApplicationStore(), RestoreContext.InitialValue);
Microsoft.AspNetCore.Components.Server (7)
Circuits\CircuitFactory.cs (1)
79await appLifetime.RestoreStateAsync(store, RestoreContext.InitialValue);
Circuits\CircuitHost.cs (6)
801var context = (isRestore, _isFirstUpdate) switch 803(_, false) => RestoreContext.ValueUpdate, 804(true, _) => RestoreContext.LastSnapshot, 805(false, _) => RestoreContext.InitialValue 807if (context == RestoreContext.ValueUpdate) 872RestoreContext context,