ArrayRange and RenderTreeDiff are readonly structs, so use fields directly
This commit is contained in:
parent
83fa72bc7e
commit
48627db47f
|
|
@ -16,12 +16,12 @@ namespace Microsoft.AspNetCore.Blazor.RenderTree
|
|||
/// <summary>
|
||||
/// Gets the underlying array instance.
|
||||
/// </summary>
|
||||
public T[] Array { get; }
|
||||
public readonly T[] Array;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of items in the array that are considered to be in use.
|
||||
/// </summary>
|
||||
public int Count { get; }
|
||||
public readonly int Count;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an instance of <see cref="ArrayRange{T}"/>.
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@ namespace Microsoft.AspNetCore.Blazor.RenderTree
|
|||
/// <summary>
|
||||
/// Gets the ID of the component.
|
||||
/// </summary>
|
||||
public int ComponentId { get; }
|
||||
public readonly int ComponentId;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the changes to the render tree since a previous state.
|
||||
/// </summary>
|
||||
public ArrayRange<RenderTreeEdit> Edits { get; }
|
||||
public readonly ArrayRange<RenderTreeEdit> Edits;
|
||||
|
||||
/// <summary>
|
||||
/// Gets render frames that may be referenced by entries in <see cref="Edits"/>.
|
||||
/// 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; }
|
||||
public readonly ArrayRange<RenderTreeFrame> ReferenceFrames;
|
||||
|
||||
internal RenderTreeDiff(
|
||||
int componentId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue