15 references to TryTakeFromJson
BasicTestApp (1)
PreserveStateService.cs (1)
27if (_componentApplicationState.TryTakeFromJson<ServiceState>("Service", out var state))
Microsoft.AspNetCore.Components.Endpoints (2)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
31state.TryTakeFromJson(PersistenceKey, out _currentToken);
src\Components\Shared\src\ResourceCollectionProvider.cs (1)
25_ = _state.TryTakeFromJson(ResourceCollectionUrlKey, out _url);
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
31state.TryTakeFromJson(PersistenceKey, out _currentToken);
Microsoft.AspNetCore.Components.Tests (8)
Lifetime\ComponentApplicationStateTest.cs (7)
24Assert.True(applicationState.TryTakeFromJson<byte[]>("MyState", out var existing)); 58Assert.True(applicationState.TryTakeFromJson<byte[]>("MyState", out var existing)); 60Assert.False(applicationState.TryTakeFromJson<byte[]>("MyState", out var gone)); 148Assert.True(applicationState.TryTakeFromJson<byte[]>("MyState", out var stored)); 152Assert.False(applicationState.TryTakeFromJson<byte[]>("MyState", out _)); 166Assert.True(applicationState.TryTakeFromJson<byte[]>("MyState", out var stored)); 170Assert.False(applicationState.TryTakeFromJson<byte[]>("MyState", out _));
Lifetime\ComponentStatePersistenceManagerTest.cs (1)
34Assert.True(lifetime.State.TryTakeFromJson<byte[]>("MyState", out var retrieved));
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
31state.TryTakeFromJson(PersistenceKey, out _currentToken);
Microsoft.AspNetCore.Components.WebAssembly (2)
src\Components\Shared\src\DefaultAntiforgeryStateProvider.cs (1)
31state.TryTakeFromJson(PersistenceKey, out _currentToken);
src\Components\Shared\src\ResourceCollectionProvider.cs (1)
25_ = _state.TryTakeFromJson(ResourceCollectionUrlKey, out _url);