Beispiel #1
0
        private static T FindComponent <T>(CapturedBatch batch, out int componentId)
        {
            var componentFrame = batch.ReferenceFrames.Single(
                frame => frame.FrameType == RenderTreeFrameType.Component &&
                frame.Component is T);

            componentId = componentFrame.ComponentId;
            return((T)componentFrame.Component);
        }
Beispiel #2
0
 private static TComponent FindComponent <TComponent>(CapturedBatch batch)
 => batch.ReferenceFrames
 .Where(f => f.FrameType == RenderTreeFrameType.Component)
 .Select(f => f.Component)
 .OfType <TComponent>()
 .Single();
Beispiel #3
0
 private static IEnumerable <TestInputRadio> FindInputRadioComponents(CapturedBatch batch)
 => batch.ReferenceFrames
 .Where(f => f.FrameType == RenderTreeFrameType.Component)
 .Select(f => f.Component)
 .OfType <TestInputRadio>();
Beispiel #4
0
 private static EditForm FindEditFormComponent(CapturedBatch batch)
 => batch.ReferenceFrames
 .Where(f => f.FrameType == RenderTreeFrameType.Component)
 .Select(f => f.Component)
 .OfType <EditForm>()
 .Single();
 private static void AssertPrependText(CapturedBatch batch, RenderTreeEdit edit, string text)
 {
     Assert.Equal(RenderTreeEditType.PrependFrame, edit.Type);
     ref var referenceFrame = ref batch.ReferenceFrames[edit.ReferenceFrameIndex];