1 write to State
Microsoft.AspNetCore.Components (1)
31 references to State
Microsoft.AspNetCore.Components (3)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Microsoft.AspNetCore.Components.Tests (14)
Lifetime\ComponentStatePersistenceManagerTest.cs (14)
34Assert.True(lifetime.State.TryTakeFromJson<byte[]>("MyState", out var retrieved));
67lifetime.State.RegisterOnPersisting(() =>
69lifetime.State.PersistAsJson("MyState", new byte[] { 1, 2, 3, 4 });
89lifetime.State.RegisterOnPersisting(() =>
91lifetime.State.PersistAsJson("MyState", new byte[] { 1, 2, 3, 4 });
114lifetime.State.RegisterOnPersisting(() => { invoked = true; return default; }, new TestRenderMode());
137lifetime.State.RegisterOnPersisting(async () => { sequence.Add(1); await tcs.Task; sequence.Add(3); }, new TestRenderMode());
138lifetime.State.RegisterOnPersisting(async () => { sequence.Add(2); await tcs2.Task; sequence.Add(4); }, new TestRenderMode());
165var subscription1 = lifetime.State.RegisterOnPersisting(async () => { sequence.Add(1); await tcs.Task; sequence.Add(3); });
166var subscription2 = lifetime.State.RegisterOnPersisting(async () => { sequence.Add(2); await tcs2.Task; sequence.Add(4); });
196lifetime.State.RegisterOnPersisting(() => throw new InvalidOperationException(), new TestRenderMode());
197lifetime.State.RegisterOnPersisting(() => { invoked = true; return Task.CompletedTask; }, new TestRenderMode());
222lifetime.State.RegisterOnPersisting(async () => { await tcs.Task; throw new InvalidOperationException(); }, new TestRenderMode());
223lifetime.State.RegisterOnPersisting(() => { invoked = true; return Task.CompletedTask; }, new TestRenderMode());
Microsoft.AspNetCore.Components.Web.Tests (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (8)