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