87 references to EventType
Microsoft.AspNetCore.Components.Tests (87)
RendererTest.cs (87)
237var log = new ConcurrentQueue<(int id, NestedAsyncComponent.EventType @event)>();
244NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInit),
245NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
246NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSet),
247NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async: true),
251NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInit),
252NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
253NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSet),
254NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async: true),
396var log = new ConcurrentQueue<(int id, NestedAsyncComponent.EventType @event)>();
403NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInit),
404NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
405NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSet),
406NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async: true),
410NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInit),
411NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInitAsyncAsync),
412NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSet),
413NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync),
440var log = new ConcurrentQueue<(int id, NestedAsyncComponent.EventType @event)>();
447NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInit),
448NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
449NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSet),
450NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async: true),
454NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInit),
455NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
456NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSet),
457NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync),
484var log = new ConcurrentQueue<(int id, NestedAsyncComponent.EventType @event)>();
491NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInit),
492NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
493NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSet),
494NestedAsyncComponent.ExecutionAction.On(0, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async: true),
498NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInit),
499NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
500NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSet),
501NestedAsyncComponent.ExecutionAction.On(1, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async:true),
505NestedAsyncComponent.ExecutionAction.On(2, NestedAsyncComponent.EventType.OnInit),
506NestedAsyncComponent.ExecutionAction.On(2, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
507NestedAsyncComponent.ExecutionAction.On(2, NestedAsyncComponent.EventType.OnParametersSet),
508NestedAsyncComponent.ExecutionAction.On(2, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async:true),
512NestedAsyncComponent.ExecutionAction.On(3, NestedAsyncComponent.EventType.OnInit),
513NestedAsyncComponent.ExecutionAction.On(3, NestedAsyncComponent.EventType.OnInitAsyncAsync, async:true),
514NestedAsyncComponent.ExecutionAction.On(3, NestedAsyncComponent.EventType.OnParametersSet),
515NestedAsyncComponent.ExecutionAction.On(3, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync, async:true),
3560Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3593Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3626Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3627EventAction = () => Task.FromException<(int, NestedAsyncComponent.EventType)>(exception),
3660Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3758Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3770Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3816Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3827Event = NestedAsyncComponent.EventType.OnInitAsyncAsync,
3870Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync,
3881Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync,
3885return Task.FromResult((1, NestedAsyncComponent.EventType.OnAfterRenderAsyncSync));
3924Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync,
3936Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync,
3941return (1, NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync);
4041var tcs = new TaskCompletionSource<(int, NestedAsyncComponent.EventType)>();
4054Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync,
4076var tcs = new TaskCompletionSource<(int, NestedAsyncComponent.EventType)>();
4088Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncAsync,
4125Event = NestedAsyncComponent.EventType.OnAfterRenderAsyncSync,
5645private void AssertStream(int expectedId, (int id, NestedAsyncComponent.EventType @event)[] logStream)
5648Assert.Equal((expectedId, NestedAsyncComponent.EventType.OnInit), logStream[0]);
5652e => e == (expectedId, NestedAsyncComponent.EventType.OnInitAsyncAsync) || e == (expectedId, NestedAsyncComponent.EventType.OnInitAsyncSync));
5654var parametersSetEvent = logStream.Where(le => le == (expectedId, NestedAsyncComponent.EventType.OnParametersSet)).ToArray();
5659.Where(le => le == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync) ||
5660le == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncSync))
5669Assert.True(logStream.Last() == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncSync) ||
5670logStream.Last() == (expectedId, NestedAsyncComponent.EventType.OnParametersSetAsyncAsync));
5707[Parameter] public ConcurrentQueue<(int testId, EventType @event)> Log { get; set; }
5711if (TryGetEntry(EventType.OnInit, out var entry))
5721if (TryGetEntry(EventType.OnInitAsyncSync, out var entrySync))
5727else if (TryGetEntry(EventType.OnInitAsyncAsync, out var entryAsync))
5736if (TryGetEntry(EventType.OnParametersSet, out var entry))
5747if (TryGetEntry(EventType.OnParametersSetAsyncSync, out var entrySync))
5753else if (TryGetEntry(EventType.OnParametersSetAsyncAsync, out var entryAsync))
5768if (TryGetEntry(EventType.OnAfterRenderAsyncSync, out var entrySync))
5774if (TryGetEntry(EventType.OnAfterRenderAsyncAsync, out var entryAsync))
5781private bool TryGetEntry(EventType eventType, out ExecutionAction entry)
5792private void LogResult((int, EventType) entry)
5799public EventType Event { get; set; }
5800public Func<Task<(int id, EventType @event)>> EventAction { get; set; }
5802public static ExecutionAction On(int id, EventType @event, bool async = false)