/
RenderBatch.cs
48 lines (43 loc) · 1.91 KB
/
RenderBatch.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Components.RenderTree
{
/// <summary>
/// Types in the Microsoft.AspNetCore.Components.RenderTree are not recommended for use outside
/// of the Blazor framework. These types will change in a future release.
/// </summary>
//
// Describes a set of UI changes.
public readonly struct RenderBatch
{
/// <summary>
/// Gets the changes to components that were added or updated.
/// </summary>
public ArrayRange<RenderTreeDiff> UpdatedComponents { get; }
/// <summary>
/// Gets render frames that may be referenced by entries in <see cref="UpdatedComponents"/>.
/// For example, edit entries of type <see cref="RenderTreeEditType.PrependFrame"/>
/// will point to an entry in this array to specify the subtree to be prepended.
/// </summary>
public ArrayRange<RenderTreeFrame> ReferenceFrames { get; }
/// <summary>
/// Gets the IDs of the components that were disposed.
/// </summary>
public ArrayRange<int> DisposedComponentIDs { get; }
/// <summary>
/// Gets the IDs of the event handlers that were disposed.
/// </summary>
public ArrayRange<ulong> DisposedEventHandlerIDs { get; }
internal RenderBatch(
ArrayRange<RenderTreeDiff> updatedComponents,
ArrayRange<RenderTreeFrame> referenceFrames,
ArrayRange<int> disposedComponentIDs,
ArrayRange<ulong> disposedEventHandlerIDs)
{
UpdatedComponents = updatedComponents;
ReferenceFrames = referenceFrames;
DisposedComponentIDs = disposedComponentIDs;
DisposedEventHandlerIDs = disposedEventHandlerIDs;
}
}
}