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