34 instantiations of RenderTreeFrame
Microsoft.AspNetCore.Components (32)
RenderTree\RenderTreeFrame.cs (22)
391=> new RenderTreeFrame(sequence, elementSubtreeLength: 0, elementName, null); 394=> new RenderTreeFrame(sequence, isMarkup: false, textOrMarkup: textContent); 397=> new RenderTreeFrame(sequence, isMarkup: true, textOrMarkup: markupContent); 400=> new RenderTreeFrame(sequence, attributeName: name, attributeValue: value, attributeEventHandlerId: 0, attributeEventUpdatesAttributeName: null); 403=> new RenderTreeFrame(sequence, componentSubtreeLength: 0, componentType, null, null); 406=> new RenderTreeFrame(0, componentSubtreeLength: subtreeLength, typeof(IComponent), null, null); 409=> new RenderTreeFrame(sequence, regionSubtreeLength: 0); 412=> new RenderTreeFrame(sequence, elementReferenceCaptureAction: elementReferenceCaptureAction, elementReferenceCaptureId: null); 415=> new RenderTreeFrame(sequence, componentReferenceCaptureAction: componentReferenceCaptureAction, parentFrameIndex: parentFrameIndex); 418=> new RenderTreeFrame { SequenceField = sequence, FrameTypeField = RenderTreeFrameType.NamedEvent, NamedEventTypeField = eventType, NamedEventAssignedNameField = assignedName }; 421=> new RenderTreeFrame { SequenceField = sequence, FrameTypeField = RenderTreeFrameType.ComponentRenderMode, ComponentRenderModeField = renderMode }; 424=> new RenderTreeFrame(SequenceField, elementSubtreeLength: elementSubtreeLength, ElementNameField, ElementKeyField); 427=> new RenderTreeFrame(SequenceField, componentSubtreeLength: componentSubtreeLength, ComponentTypeField, ComponentStateField, ComponentKeyField); 430=> new RenderTreeFrame(sequence, attributeName: AttributeNameField, AttributeValueField, AttributeEventHandlerIdField, AttributeEventUpdatesAttributeNameField); 433=> new RenderTreeFrame(SequenceField, componentSubtreeLength: ComponentSubtreeLengthField, ComponentTypeField, componentState, ComponentKeyField); 436=> new RenderTreeFrame(SequenceField, attributeName: AttributeNameField, AttributeValueField, eventHandlerId, AttributeEventUpdatesAttributeNameField); 439=> new RenderTreeFrame(SequenceField, attributeName: AttributeNameField, attributeValue, AttributeEventHandlerIdField, AttributeEventUpdatesAttributeNameField); 442=> new RenderTreeFrame(SequenceField, attributeName: AttributeNameField, AttributeValueField, AttributeEventHandlerIdField, attributeUpdatesAttributeName); 445=> new RenderTreeFrame(SequenceField, regionSubtreeLength: regionSubtreeLength); 448=> new RenderTreeFrame(SequenceField, elementReferenceCaptureAction: ElementReferenceCaptureActionField, elementReferenceCaptureId); 451=> new RenderTreeFrame(SequenceField, elementSubtreeLength: ElementSubtreeLengthField, ElementNameField, elementKey); 454=> new RenderTreeFrame(SequenceField, componentSubtreeLength: ComponentSubtreeLengthField, ComponentTypeField, ComponentStateField, componentKey);
RenderTree\RenderTreeFrameArrayBuilder.cs (10)
24_items[_itemsInUse++] = new RenderTreeFrame 39_items[_itemsInUse++] = new RenderTreeFrame 54_items[_itemsInUse++] = new RenderTreeFrame 69_items[_itemsInUse++] = new RenderTreeFrame 85_items[_itemsInUse++] = new RenderTreeFrame 100_items[_itemsInUse++] = new RenderTreeFrame 115_items[_itemsInUse++] = new RenderTreeFrame 131_items[_itemsInUse++] = new RenderTreeFrame 145_items[_itemsInUse++] = new RenderTreeFrame 160_items[_itemsInUse++] = new RenderTreeFrame
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (1)
16var frame = /*MMNewObject*/new RenderTreeFrame();
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (1)
16var frame = /*MMNewObject*/new RenderTreeFrame();
404 references to RenderTreeFrame
Microsoft.AspNetCore.Components (115)
ParameterView.cs (20)
17private static readonly RenderTreeFrame[] _emptyFrames = new RenderTreeFrame[] 19RenderTreeFrame.Element(0, string.Empty).WithComponentSubtreeLength(1) 25private readonly RenderTreeFrame[] _frames; 29internal ParameterView(in ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex) 34private ParameterView(in ParameterViewLifetime lifetime, RenderTreeFrame[] frames, int ownerIndex, IReadOnlyList<CascadingParameterState> cascadingParameters) 124var cloneBuffer = new RenderTreeFrame[1 + numEntries]; 125cloneBuffer[0] = RenderTreeFrame.PlaceholderChildComponentWithSubtreeLength(1 + numEntries); 186ref var oldFrame = ref oldParameters._frames[oldIndex]; 187ref var newFrame = ref _frames[newIndex]; 232foreach (var oldFrame in oldDirectParameterFrames) 235foreach (var newFrame in newDirectParameterFrames) 252static Span<RenderTreeFrame> GetDirectParameterFrames(in ParameterView parameterView) 269internal void CaptureSnapshot(ArrayBuilder<RenderTreeFrame> builder) 278var owner = RenderTreeFrame.PlaceholderChildComponentWithSubtreeLength(1 + numEntries); 337internal Enumerator(RenderTreeFrame[] frames, int ownerIndex, IReadOnlyList<CascadingParameterState> cascadingParameters) 375private readonly RenderTreeFrame[] _frames; 381internal RenderTreeFrameParameterEnumerator(RenderTreeFrame[] frames, int ownerIndex) 410ref var frame = ref _frames[_currentIndex];
ParameterViewBuilder.cs (4)
15private readonly RenderTreeFrame[] _frames; 23_frames = new RenderTreeFrame[maxCapacity + 1]; 24_frames[0] = RenderTreeFrame 37_frames[nextIndex] = RenderTreeFrame.Attribute(0, name, value);
Rendering\ComponentState.cs (2)
24private ArrayBuilder<RenderTreeFrame>? _latestDirectParametersSnapshot; // Lazily instantiated 169_latestDirectParametersSnapshot = new ArrayBuilder<RenderTreeFrame>();
Rendering\RenderBatchBuilder.cs (4)
29public ArrayBuilder<RenderTreeFrame> ReferenceFramesBuffer { get; } = new ArrayBuilder<RenderTreeFrame>(64); 85public void AddNamedEvent(int componentId, int frameIndex, ref RenderTreeFrame frame) 91public void RemoveNamedEvent(int componentId, int frameIndex, ref RenderTreeFrame frame)
Rendering\RenderTreeBuilder.cs (13)
17/// Provides methods for building a collection of <see cref="RenderTreeFrame"/> entries. 419/// <param name="frame">A <see cref="RenderTreeFrame"/> holding the name and value of the attribute.</param> 420public void AddAttribute(int sequence, RenderTreeFrame frame) 476ref var prevFrame = ref _entries.Buffer[_entries.Count - 1]; 540ref var parentFrame = ref _entries.Buffer[parentFrameIndexValue]; 651ref var parentFrame = ref _entries.Buffer[parentFrameIndexValue]; 765_entries.InsertExpensive(insertAtIndex, RenderTreeFrame.Attribute(sequence, attributeName, attributeValue)); 770/// Returns the <see cref="RenderTreeFrame"/> values that have been appended. 772/// <returns>An array range of <see cref="RenderTreeFrame"/> values.</returns> 773public ArrayRange<RenderTreeFrame> GetFrames() => 782ref var invalidFrame = ref _entries.Buffer[_openElementIndices.Peek()]; 811ref var frame = ref buffer[i]; 854ref var frame = ref buffer[i];
Rendering\RenderTreeUpdater.cs (5)
26ref var frame = ref framesArray[frameIndex]; 54private static void UpdateFrameToMatchClientState(RenderTreeBuilder renderTreeBuilder, RenderTreeFrame[] framesArray, int elementFrameIndex, string attributeName, object attributeValue) 57ref var elementFrame = ref framesArray[elementFrameIndex]; 61ref var attributeFrame = ref framesArray[attributeFrameIndex]; 93ref var otherFrame = ref framesArray[otherFrameIndex];
RenderTree\RenderBatch.cs (2)
24public ArrayRange<RenderTreeFrame> ReferenceFrames { get; } 43ArrayRange<RenderTreeFrame> referenceFrames,
RenderTree\Renderer.cs (10)
230protected ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId) => GetRequiredComponentState(componentId).CurrentRenderTree.GetFrames(); 402/// <param name="eventHandlerId">The <see cref="RenderTreeFrame.AttributeEventHandlerId"/> value from the original event attribute.</param> 417/// <param name="eventHandlerId">The <see cref="RenderTreeFrame.AttributeEventHandlerId"/> value from the original event attribute.</param> 509/// <param name="eventHandlerId">The <see cref="RenderTreeFrame.AttributeEventHandlerId"/> value from the original event attribute.</param> 524internal ComponentState InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, int frameIndex, int parentComponentId) 526ref var frame = ref frames[frameIndex]; 529throw new ArgumentException($"The frame's {nameof(RenderTreeFrame.FrameType)} property must equal {RenderTreeFrameType.Component}", nameof(frameIndex)); 549private static IComponentRenderMode? FindCallerSpecifiedRenderMode(RenderTreeFrame[] frames, int componentFrameIndex) 558ref var frame = ref frames[index]; 618internal void AssignEventHandlerId(int renderedByComponentId, ref RenderTreeFrame frame)
RenderTree\RenderTreeDiffBuilder.cs (30)
25ArrayRange<RenderTreeFrame> oldTree, 26ArrayRange<RenderTreeFrame> newTree) 40public static void DisposeFrames(RenderBatchBuilder batchBuilder, int componentId, ArrayRange<RenderTreeFrame> frames) 79ref var oldFrame = ref oldTree[oldStartIndex]; 91ref var newFrame = ref newTree[newStartIndex]; 333ref var frame = ref oldTree[oldStartIndex]; 350ref var frame = ref newTree[newStartIndex]; 375private static void ThrowExceptionForDuplicateKey(object key, in RenderTreeFrame frame) 390private static object KeyValue(ref RenderTreeFrame frame) 539private static int NextSiblingIndex(in RenderTreeFrame frame, int frameIndex) 561ref var oldFrame = ref oldTree[oldFrameIndex]; 562ref var newFrame = ref newTree[newFrameIndex]; 762ref var oldFrame = ref oldTree[oldFrameIndex]; 763ref var newFrame = ref newTree[newFrameIndex]; 793ref var newFrame = ref newTree[newFrameIndex]; 854ref var oldFrame = ref oldTree[oldFrameIndex]; 901private static int GetAttributesEndIndexExclusive(RenderTreeFrame[] tree, int rootIndex) 936ref var frame = ref frames[i]; 961ref var frame = ref frames[frameIndex]; 971private static void InitializeNewAttributeFrame(ref DiffContext diffContext, ref RenderTreeFrame newFrame) 985private static void InitializeNewElementReferenceCaptureFrame(ref DiffContext diffContext, ref RenderTreeFrame newFrame) 992private static void InitializeNewComponentReferenceCaptureFrame(ref DiffContext diffContext, ref RenderTreeFrame newFrame) 994ref var parentFrame = ref diffContext.NewTree[newFrame.ComponentReferenceCaptureParentFrameIndexField]; 1016private static void DisposeFramesInRange(RenderBatchBuilder batchBuilder, int componentId, RenderTreeFrame[] frames, int startIndex, int endIndexExcl) 1020ref var frame = ref frames[i]; 1047public readonly RenderTreeFrame[] OldTree; 1048public readonly RenderTreeFrame[] NewTree; 1050public readonly ArrayBuilder<RenderTreeFrame> ReferenceFrames; 1060RenderTreeFrame[] oldTree, 1061RenderTreeFrame[] newTree)
RenderTree\RenderTreeFrame.cs (22)
390internal static RenderTreeFrame Element(int sequence, string elementName) 393internal static RenderTreeFrame Text(int sequence, string textContent) 396internal static RenderTreeFrame Markup(int sequence, string markupContent) 399internal static RenderTreeFrame Attribute(int sequence, string name, object value) 402internal static RenderTreeFrame ChildComponent(int sequence, [DynamicallyAccessedMembers(LinkerFlags.Component)] Type componentType) 405internal static RenderTreeFrame PlaceholderChildComponentWithSubtreeLength(int subtreeLength) 408internal static RenderTreeFrame Region(int sequence) 411internal static RenderTreeFrame ElementReferenceCapture(int sequence, Action<ElementReference> elementReferenceCaptureAction) 414internal static RenderTreeFrame ComponentReferenceCapture(int sequence, Action<object> componentReferenceCaptureAction, int parentFrameIndex) 417internal static RenderTreeFrame NamedEvent(int sequence, string eventType, string assignedName) 420internal static RenderTreeFrame ComponentRenderModeFrame(int sequence, IComponentRenderMode renderMode) 423internal RenderTreeFrame WithElementSubtreeLength(int elementSubtreeLength) 426internal RenderTreeFrame WithComponentSubtreeLength(int componentSubtreeLength) 429internal RenderTreeFrame WithAttributeSequence(int sequence) 432internal RenderTreeFrame WithComponent(ComponentState componentState) 435internal RenderTreeFrame WithAttributeEventHandlerId(ulong eventHandlerId) 438internal RenderTreeFrame WithAttributeValue(object attributeValue) 441internal RenderTreeFrame WithAttributeEventUpdatesAttributeName(string attributeUpdatesAttributeName) 444internal RenderTreeFrame WithRegionSubtreeLength(int regionSubtreeLength) 447internal RenderTreeFrame WithElementReferenceCaptureId(string elementReferenceCaptureId) 450internal RenderTreeFrame WithElementKey(object elementKey) 453internal RenderTreeFrame WithComponentKey(object componentKey)
RenderTree\RenderTreeFrameArrayBuilder.cs (2)
10/// A special subclass of <see cref="ArrayBuilder{T}"/> that contains methods optimized for appending <see cref="RenderTreeFrame"/> entries. 12internal sealed class RenderTreeFrameArrayBuilder : ArrayBuilder<RenderTreeFrame>
RenderTree\RenderTreeFrameType.cs (1)
30/// Represents a key-value pair associated with another <see cref="RenderTreeFrame"/>.
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (1)
16var frame = /*MMNewObject*/new RenderTreeFrame();
Microsoft.AspNetCore.Components.Authorization.Tests (26)
AuthorizeRouteViewTest.cs (1)
373ref var referenceFrame = ref batch.ReferenceFrames[edit.ReferenceFrameIndex];
CascadingAuthenticationStateTest.cs (1)
86var receiveAuthStateFrame = batch1.GetComponentFrames<ReceiveAuthStateComponent>().Single();
src\Components\Shared\test\AssertFrame.cs (21)
10public static void Sequence(RenderTreeFrame frame, int? sequence = null) 18public static void Text(RenderTreeFrame frame, string textContent, int? sequence = null) 26internal static void Markup(RenderTreeFrame frame, string markupContent, int? sequence = null) 34public static void Element(RenderTreeFrame frame, string elementName, int subtreeLength, int? sequence = null) 42public static void Attribute(RenderTreeFrame frame, string attributeName, int? sequence = null) 49public static void Attribute(RenderTreeFrame frame, string attributeName, string attributeValue, int? sequence = null) 55public static void Attribute(RenderTreeFrame frame, string attributeName, Action<EventArgs> attributeEventHandlerValue, int? sequence = null) 61public static void Attribute(RenderTreeFrame frame, string attributeName, object attributeValue, int? sequence = null) 67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null) 73public static void Attribute(RenderTreeFrame frame, string attributeName, Action<object> attributeValidator, int? sequence = null) 79public static void Component<T>(RenderTreeFrame frame, int? subtreeLength = null, int? sequence = null) where T : IComponent 84public static void Component(RenderTreeFrame frame, string typeName, int? subtreeLength = null, int? sequence = null) 95public static void ComponentWithInstance<T>(RenderTreeFrame frame, int componentId, int? subtreeLength = null, int? sequence = null) where T : IComponent 102public static void Region(RenderTreeFrame frame, int subtreeLength, int? sequence = null) 109public static void MarkupWhitespace(RenderTreeFrame frame, int? sequence = null) 116public static void TextWhitespace(RenderTreeFrame frame, int? sequence = null) 123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null) 130public static void ComponentReferenceCapture(RenderTreeFrame frame, int? sequence = null) 137public static void ComponentReferenceCapture(RenderTreeFrame frame, Action<object> action, int? sequence = null) 144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode) 151public static void NamedEvent(RenderTreeFrame frame, string eventType, string assignedName)
src\Components\Shared\test\CapturedBatch.cs (2)
17public RenderTreeFrame[] ReferenceFrames { get; set; } 19public IEnumerable<RenderTreeFrame> GetComponentFrames<T>() where T : IComponent
src\Components\Shared\test\TestRenderer.cs (1)
58public new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
Microsoft.AspNetCore.Components.Endpoints (3)
Rendering\EndpointHtmlRenderer.EventDispatch.cs (2)
150ref var frame = ref frames.Array[frameIndex]; 166ref var candidate = ref frames.Array[i];
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
248protected override void RenderChildComponent(TextWriter output, ref RenderTreeFrame componentFrame)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
ImportMapTest.cs (1)
291public new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
Microsoft.AspNetCore.Components.Forms.Tests (24)
src\Components\Shared\test\AssertFrame.cs (21)
10public static void Sequence(RenderTreeFrame frame, int? sequence = null) 18public static void Text(RenderTreeFrame frame, string textContent, int? sequence = null) 26internal static void Markup(RenderTreeFrame frame, string markupContent, int? sequence = null) 34public static void Element(RenderTreeFrame frame, string elementName, int subtreeLength, int? sequence = null) 42public static void Attribute(RenderTreeFrame frame, string attributeName, int? sequence = null) 49public static void Attribute(RenderTreeFrame frame, string attributeName, string attributeValue, int? sequence = null) 55public static void Attribute(RenderTreeFrame frame, string attributeName, Action<EventArgs> attributeEventHandlerValue, int? sequence = null) 61public static void Attribute(RenderTreeFrame frame, string attributeName, object attributeValue, int? sequence = null) 67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null) 73public static void Attribute(RenderTreeFrame frame, string attributeName, Action<object> attributeValidator, int? sequence = null) 79public static void Component<T>(RenderTreeFrame frame, int? subtreeLength = null, int? sequence = null) where T : IComponent 84public static void Component(RenderTreeFrame frame, string typeName, int? subtreeLength = null, int? sequence = null) 95public static void ComponentWithInstance<T>(RenderTreeFrame frame, int componentId, int? subtreeLength = null, int? sequence = null) where T : IComponent 102public static void Region(RenderTreeFrame frame, int subtreeLength, int? sequence = null) 109public static void MarkupWhitespace(RenderTreeFrame frame, int? sequence = null) 116public static void TextWhitespace(RenderTreeFrame frame, int? sequence = null) 123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null) 130public static void ComponentReferenceCapture(RenderTreeFrame frame, int? sequence = null) 137public static void ComponentReferenceCapture(RenderTreeFrame frame, Action<object> action, int? sequence = null) 144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode) 151public static void NamedEvent(RenderTreeFrame frame, string eventType, string assignedName)
src\Components\Shared\test\CapturedBatch.cs (2)
17public RenderTreeFrame[] ReferenceFrames { get; set; } 19public IEnumerable<RenderTreeFrame> GetComponentFrames<T>() where T : IComponent
src\Components\Shared\test\TestRenderer.cs (1)
58public new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
TestFiles\ComponentInternalUsageDiagnosticsAnalyzerTest\UsersRendererTypesInMethodBody.cs (1)
16var frame = /*MMNewObject*/new RenderTreeFrame();
Microsoft.AspNetCore.Components.Server (2)
src\Components\Shared\src\RenderBatchWriter.cs (2)
116int Write(in ArrayRange<RenderTreeFrame> frames) 131void Write(in RenderTreeFrame frame)
Microsoft.AspNetCore.Components.Server.Tests (20)
Circuits\RenderBatchWriterTest.cs (20)
75new ArrayRange<RenderTreeFrame>(), 199new ArrayRange<RenderTreeFrame>(new[] { 200RenderTreeFrame.Attribute(123, "Attribute with string value", "String value"), 201RenderTreeFrame.Attribute(124, "Attribute with nonstring value", 1), 202RenderTreeFrame.Attribute(125, "Attribute with delegate value", new Action(() => { })) 204RenderTreeFrame.ChildComponent(126, typeof(object)) 207RenderTreeFrame.ComponentReferenceCapture(127, value => { }, 1001), 208RenderTreeFrame.Element(128, "Some element") 210RenderTreeFrame.ElementReferenceCapture(129, value => { }) 212RenderTreeFrame.Region(130) 214RenderTreeFrame.Text(131, "Some text"), 215RenderTreeFrame.Markup(132, "Some markup"), 216RenderTreeFrame.Text(133, "\n\t "), 217RenderTreeFrame.NamedEvent(135, "SomeEventType", "Some assigned name"), 218RenderTreeFrame.ComponentRenderModeFrame(136, RenderMode.InteractiveAuto), 221RenderTreeFrame.Attribute(200, "Attribute with string value", "String value"), 222RenderTreeFrame.Element(201, "Some element") // Will be deduplicated 224RenderTreeFrame.Text(236, "Some text"), // Will not be deduplicated 225RenderTreeFrame.Markup(237, "Some markup"), // Will not be deduplicated 226RenderTreeFrame.Text(238, "\n\t "), // Will be deduplicated
Microsoft.AspNetCore.Components.Tests (142)
CascadingParameterTest.cs (1)
900var componentFrame = batch.ReferenceFrames.Single(
ParameterViewTest.cs (81)
17RenderTreeFrame.ChildComponent(0, typeof(FakeComponent)).WithComponentSubtreeLength(1) 31RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(1) 47RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(3), 48RenderTreeFrame.Attribute(1, "attribute 1", attribute1Value), 49RenderTreeFrame.Attribute(2, "attribute 2", attribute2Value), 53RenderTreeFrame.Attribute(3, "orphaned attribute", "value") 71RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(3), 72RenderTreeFrame.Attribute(1, "attribute 1", attribute1Value), 73RenderTreeFrame.Attribute(2, "attribute 2", attribute2Value), 74RenderTreeFrame.Element(3, "child element").WithElementSubtreeLength(2), 75RenderTreeFrame.Attribute(4, "child attribute", "some value") 94RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 95RenderTreeFrame.Attribute(1, "attribute 1", attribute1Value) 115RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 116RenderTreeFrame.Attribute(1, "some other entry", new object()) 133RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 134RenderTreeFrame.Attribute(1, "my entry", "hello") 152RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 153RenderTreeFrame.Attribute(1, "my entry", myEntryValue), 154RenderTreeFrame.Attribute(1, "my other entry", new object()) 171RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(3), 172RenderTreeFrame.Attribute(1, "my entry", myEntryValue), 173RenderTreeFrame.Attribute(1, "my entry", new object()), 189RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 190RenderTreeFrame.Attribute(1, "some other entry", new object()) 210RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 211RenderTreeFrame.Attribute(1, "some other entry", new object()) 227RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 228RenderTreeFrame.Attribute(1, "my entry", "hello") 275RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(3), 276RenderTreeFrame.Attribute(0, "entry 1", "value 1"), 277RenderTreeFrame.Attribute(0, "entry 2", entry2Value), 304RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 305RenderTreeFrame.Attribute(1, "unrelated value", new object()) 328RenderTreeFrame.ChildComponent(0, typeof(FakeComponent)).WithComponentSubtreeLength(1) 366RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 367RenderTreeFrame.Attribute(1, "attribute 1", attribute1Value), 388RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 389RenderTreeFrame.Attribute(1, "attribute 1", attribute1Value), 390RenderTreeFrame.Attribute(1, "attribute 2", attribute2Value), 391RenderTreeFrame.Attribute(1, "attribute 3", attribute3Value), 411RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(1), 415RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(1), 431RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(1), 435RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 436RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 452RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(2), 453RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 457RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(1), 473RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 474RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 475RenderTreeFrame.Attribute(2, "attribute 2", "value 2"), 476RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 480RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(3), 481RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 482RenderTreeFrame.Attribute(2, "attribute 3", "value 3"), 498RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 499RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 500RenderTreeFrame.Attribute(2, "attribute 2", "value 2"), 501RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 505RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 506RenderTreeFrame.Attribute(1, "attribute 2", "value 1"), 507RenderTreeFrame.Attribute(2, "attribute replaced", "value 2"), 508RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 524RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 525RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 526RenderTreeFrame.Attribute(2, "attribute 2", "value 2"), 527RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 531RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(5), 532RenderTreeFrame.Attribute(1, "attribute 2", "value 1"), 533RenderTreeFrame.Attribute(2, "attribute replaced", "value 2"), 534RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 535RenderTreeFrame.Attribute(4, "attribute 4", "value 3"), 551RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 552RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 553RenderTreeFrame.Attribute(2, "attribute 2", "value 2"), 554RenderTreeFrame.Attribute(3, "attribute 3", "value 3"), 558RenderTreeFrame.Element(0, "some element").WithElementSubtreeLength(4), 559RenderTreeFrame.Attribute(1, "attribute 1", "value 1"), 560RenderTreeFrame.Attribute(2, "attribute 3", "value 3"), 561RenderTreeFrame.Attribute(3, "attribute 2", "value 2"),
RendererTest.cs (19)
74var componentFrame = batch.ReferenceFrames 142var nestedComponentFrame = renderer.Batches.Single() 797var nestedComponentFrame = renderer.Batches.Single() 969var nestedComponentFrame = renderer.Batches.Single() 2047var nestedComponentFrame = renderer.Batches.Single() 2088var originalComponentFrame = renderer.Batches.Single() 2641var rootComponentFrame = batch.ReferenceFrames[0]; 2642var childComponentFrame = rootComponentDiff.Edits 2768var rootComponentFrame = batch.ReferenceFrames[0]; 2769var childComponentFrame = rootComponentDiff.Edits 2859var childComponentFrame = origBatchReferenceFrames 4219var componentFrame = batch.ReferenceFrames 4361var attributeFrame = batch2.ReferenceFrames[edit.ReferenceFrameIndex]; 4413var attributeFrame = latestBatch.ReferenceFrames[edit.ReferenceFrameIndex]; 4802var nestedDisposableComponentFrame = renderer.Batches[0] 4804var nestedAsyncDisposableComponentFrame = renderer.Batches[0] 4876var nestedComponentFrame = renderer.Batches[0] 4918var nestedDisposableComponentFrame = renderer.Batches[0] 4920var nestedAsyncDisposableComponentFrame = renderer.Batches[0]
Rendering\RenderTreeBuilderTest.cs (2)
150var frame = builder.GetFrames().AsEnumerable().Single(); 423var frame = frames[i++];
RenderTreeDiffBuilderTest.cs (9)
925var removedEventHandlerFrame = oldTree.GetFrames().Array[2]; 1636var newFrame1 = newTree.GetFrames().Array[2]; 1637var newFrame2 = newTree.GetFrames().Array[3]; 1661var oldAttributeFrame = oldTree.GetFrames().Array[1]; 1662var newAttributeFrame = newTree.GetFrames().Array[1]; 1688var oldAttributeFrame = oldTree.GetFrames().Array[1]; 1689var newAttributeFrame = newTree.GetFrames().Array[2]; 2394private (RenderTreeDiff, RenderTreeFrame[]) GetSingleUpdatedComponent(bool initializeFromFrames = false) 2400private (RenderTreeDiff, RenderTreeFrame[], RenderBatch) GetSingleUpdatedComponentWithBatch(bool initializeFromFrames = false, int componentId = 0)
RenderTreeUpdaterTest.cs (3)
186private static ArrayRange<RenderTreeFrame> BuildFrames(params RenderTreeFrame[] frames) 187=> new ArrayRange<RenderTreeFrame>(frames, frames.Length);
Routing\RouterTest.cs (3)
197var renderedFrame = _renderer.Batches.First().ReferenceFrames.First(); 243var renderedFrame = _renderer.Batches.First().ReferenceFrames.First(); 263var renderedFrame = _renderer.Batches.First().ReferenceFrames.First();
src\Components\Shared\test\AssertFrame.cs (21)
10public static void Sequence(RenderTreeFrame frame, int? sequence = null) 18public static void Text(RenderTreeFrame frame, string textContent, int? sequence = null) 26internal static void Markup(RenderTreeFrame frame, string markupContent, int? sequence = null) 34public static void Element(RenderTreeFrame frame, string elementName, int subtreeLength, int? sequence = null) 42public static void Attribute(RenderTreeFrame frame, string attributeName, int? sequence = null) 49public static void Attribute(RenderTreeFrame frame, string attributeName, string attributeValue, int? sequence = null) 55public static void Attribute(RenderTreeFrame frame, string attributeName, Action<EventArgs> attributeEventHandlerValue, int? sequence = null) 61public static void Attribute(RenderTreeFrame frame, string attributeName, object attributeValue, int? sequence = null) 67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null) 73public static void Attribute(RenderTreeFrame frame, string attributeName, Action<object> attributeValidator, int? sequence = null) 79public static void Component<T>(RenderTreeFrame frame, int? subtreeLength = null, int? sequence = null) where T : IComponent 84public static void Component(RenderTreeFrame frame, string typeName, int? subtreeLength = null, int? sequence = null) 95public static void ComponentWithInstance<T>(RenderTreeFrame frame, int componentId, int? subtreeLength = null, int? sequence = null) where T : IComponent 102public static void Region(RenderTreeFrame frame, int subtreeLength, int? sequence = null) 109public static void MarkupWhitespace(RenderTreeFrame frame, int? sequence = null) 116public static void TextWhitespace(RenderTreeFrame frame, int? sequence = null) 123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null) 130public static void ComponentReferenceCapture(RenderTreeFrame frame, int? sequence = null) 137public static void ComponentReferenceCapture(RenderTreeFrame frame, Action<object> action, int? sequence = null) 144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode) 151public static void NamedEvent(RenderTreeFrame frame, string eventType, string assignedName)
src\Components\Shared\test\CapturedBatch.cs (2)
17public RenderTreeFrame[] ReferenceFrames { get; set; } 19public IEnumerable<RenderTreeFrame> GetComponentFrames<T>() where T : IComponent
src\Components\Shared\test\TestRenderer.cs (1)
58public new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
Microsoft.AspNetCore.Components.Web (19)
HtmlRendering\StaticHtmlRenderer.cs (1)
104internal new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (17)
47/// <param name="componentFrame">The <see cref="RenderTreeFrame"/> representing the component to be rendered.</param> 48protected virtual void RenderChildComponent(TextWriter output, ref RenderTreeFrame componentFrame) 53private int RenderFrames(int componentId, TextWriter output, ArrayRange<RenderTreeFrame> frames, int position, int maxElements) 73ArrayRange<RenderTreeFrame> frames, 76ref var frame = ref frames.Array[position]; 104private int RenderElement(int componentId, TextWriter output, ArrayRange<RenderTreeFrame> frames, int position) 106ref var frame = ref frames.Array[position]; 182private int RenderScriptElementChildren(int componentId, TextWriter output, ArrayRange<RenderTreeFrame> frames, int position, int maxElements) 201private void RenderHiddenFieldForNamedSubmitEvent(int componentId, TextWriter output, ArrayRange<RenderTreeFrame> frames, int namedEventFramePosition) 205ref var namedEventFrame = ref frames.Array[namedEventFramePosition]; 209ref var enclosingElementFrame = ref frames.Array[enclosingElementFrameIndex]; 258private static bool TryFindEnclosingElementFrame(ArrayRange<RenderTreeFrame> frames, int frameIndex, out int result) 275ArrayRange<RenderTreeFrame> frames, 294ref var frame = ref frames.Array[candidateIndex]; 377private int RenderChildren(int componentId, TextWriter output, ArrayRange<RenderTreeFrame> frames, int position, int maxElements) 387private int RenderChildComponent(TextWriter output, ArrayRange<RenderTreeFrame> frames, int position) 389ref var frame = ref frames.Array[position];
Web\WebRenderTreeBuilderExtensions.cs (1)
10/// Provides methods for building a collection of <see cref="RenderTreeFrame"/> entries.
Microsoft.AspNetCore.Components.Web.Tests (29)
Forms\InputBaseTest.cs (4)
381var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 449var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 484var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single(); 512var componentFrame1 = batch1.GetComponentFrames<TestInputComponent<string>>().Single();
Forms\InputNumberTest.cs (1)
88var typeAttributeFrame = frames.Array.Single(frame =>
src\Components\Shared\test\AssertFrame.cs (21)
10public static void Sequence(RenderTreeFrame frame, int? sequence = null) 18public static void Text(RenderTreeFrame frame, string textContent, int? sequence = null) 26internal static void Markup(RenderTreeFrame frame, string markupContent, int? sequence = null) 34public static void Element(RenderTreeFrame frame, string elementName, int subtreeLength, int? sequence = null) 42public static void Attribute(RenderTreeFrame frame, string attributeName, int? sequence = null) 49public static void Attribute(RenderTreeFrame frame, string attributeName, string attributeValue, int? sequence = null) 55public static void Attribute(RenderTreeFrame frame, string attributeName, Action<EventArgs> attributeEventHandlerValue, int? sequence = null) 61public static void Attribute(RenderTreeFrame frame, string attributeName, object attributeValue, int? sequence = null) 67public static void Attribute(RenderTreeFrame frame, string attributeName, Type valueType, int? sequence = null) 73public static void Attribute(RenderTreeFrame frame, string attributeName, Action<object> attributeValidator, int? sequence = null) 79public static void Component<T>(RenderTreeFrame frame, int? subtreeLength = null, int? sequence = null) where T : IComponent 84public static void Component(RenderTreeFrame frame, string typeName, int? subtreeLength = null, int? sequence = null) 95public static void ComponentWithInstance<T>(RenderTreeFrame frame, int componentId, int? subtreeLength = null, int? sequence = null) where T : IComponent 102public static void Region(RenderTreeFrame frame, int subtreeLength, int? sequence = null) 109public static void MarkupWhitespace(RenderTreeFrame frame, int? sequence = null) 116public static void TextWhitespace(RenderTreeFrame frame, int? sequence = null) 123public static void ElementReferenceCapture(RenderTreeFrame frame, Action<ElementReference> action, int? sequence = null) 130public static void ComponentReferenceCapture(RenderTreeFrame frame, int? sequence = null) 137public static void ComponentReferenceCapture(RenderTreeFrame frame, Action<object> action, int? sequence = null) 144public static void ComponentRenderMode(RenderTreeFrame frame, IComponentRenderMode mode) 151public static void NamedEvent(RenderTreeFrame frame, string eventType, string assignedName)
src\Components\Shared\test\CapturedBatch.cs (2)
17public RenderTreeFrame[] ReferenceFrames { get; set; } 19public IEnumerable<RenderTreeFrame> GetComponentFrames<T>() where T : IComponent
src\Components\Shared\test\TestRenderer.cs (1)
58public new ArrayRange<RenderTreeFrame> GetCurrentRenderTreeFrames(int componentId)
Microsoft.AspNetCore.Components.WebView (2)
src\Components\Shared\src\RenderBatchWriter.cs (2)
116int Write(in ArrayRange<RenderTreeFrame> frames) 131void Write(in RenderTreeFrame frame)
Microsoft.AspNetCore.Components.WebView.Test (19)
Infrastructure\TestDocument.cs (19)
81var frame = batch.ReferenceFrames.Array[edit.ReferenceFrameIndex]; 96var frame = batch.ReferenceFrames.Array[edit.ReferenceFrameIndex]; 136var frame = batch.ReferenceFrames.Array[edit.ReferenceFrameIndex]; 152var frame = batch.ReferenceFrames.Array[edit.ReferenceFrameIndex]; 198private int InsertFrame(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, RenderTreeFrame frame, int frameIndex) 253private void InsertText(ContainerNode parent, int childIndex, RenderTreeFrame frame) 260private void InsertComponent(ContainerNode parent, int childIndex, RenderTreeFrame frame) 270private int InsertFrameRange(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, int startIndex, int endIndexExcl) 275var frame = batch.ReferenceFrames.Array[index]; 286private void InsertElement(RenderBatch batch, ContainerNode parent, int childIndex, ArraySegment<RenderTreeFrame> frames, RenderTreeFrame frame, int frameIndex) 296var descendantFrame = batch.ReferenceFrames.Array[i]; 320private void ApplyAttribute(RenderBatch batch, ElementNode elementNode, RenderTreeFrame attributeFrame) 349private bool TryApplySpecialProperty(RenderBatch batch, ElementNode element, string attributeName, RenderTreeFrame attributeFrame) 362private bool TryApplyValueProperty(ElementNode element, RenderTreeFrame attributeFrame) 402private bool TryApplyCheckedProperty(ElementNode element, RenderTreeFrame attributeFrame) 415private void InsertMarkup(ContainerNode parent, int childIndex, RenderTreeFrame markupFrame) 423private int CountDescendantFrames(RenderTreeFrame frame)