23 references to PersistAsJson
BasicTestApp (1)
PreserveStateService.cs (1)
41_componentApplicationState.PersistAsJson("Service", _state);
Microsoft.AspNetCore.Components.Endpoints (2)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
27state.PersistAsJson(PersistenceKey, GetAntiforgeryToken());
src\Components\Shared\src\ResourceCollectionProvider.cs (1)
40_state.PersistAsJson(ResourceCollectionUrlKey, _url);
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
EndpointHtmlRendererTest.cs (4)
1273state.PersistAsJson(renderMode, "persisted"); 1327state.PersistAsJson("key", "persisted"); 1365state.PersistAsJson("key", "persisted"); 1598State.PersistAsJson("key", "value");
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
27state.PersistAsJson(PersistenceKey, GetAntiforgeryToken());
Microsoft.AspNetCore.Components.Tests (7)
Lifetime\ComponentApplicationStateTest.cs (5)
75applicationState.PersistAsJson("MyState", myState); 93applicationState.PersistAsJson("MyState", myState); 96Assert.Throws<ArgumentException>(() => applicationState.PersistAsJson("MyState", myState)); 111applicationState.PersistAsJson("MyState", myState); 129applicationState.PersistAsJson<byte[]>("MyState", null);
Lifetime\ComponentStatePersistenceManagerTest.cs (2)
69lifetime.State.PersistAsJson("MyState", new byte[] { 1, 2, 3, 4 }); 91lifetime.State.PersistAsJson("MyState", new byte[] { 1, 2, 3, 4 });
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
27state.PersistAsJson(PersistenceKey, GetAntiforgeryToken());
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
27state.PersistAsJson(PersistenceKey, GetAntiforgeryToken());
src\Components\Shared\src\ResourceCollectionProvider.cs (1)
40_state.PersistAsJson(ResourceCollectionUrlKey, _url);
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
AuthenticationStateSerializer.cs (1)
38_state.PersistAsJson(PersistenceKey, authenticationStateData);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
PersistComponentStateTagHelperTest.cs (4)
93manager.State.PersistAsJson("state", "state value"); 123manager.State.PersistAsJson("state", "state value"); 152manager.State.PersistAsJson("state", "state value"); 205manager.State.PersistAsJson("state", "state value");