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>
|
/// <summary>
|
||||||
/// Gets the underlying array instance.
|
/// Gets the underlying array instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public T[] Array { get; }
|
public readonly T[] Array;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of items in the array that are considered to be in use.
|
/// Gets the number of items in the array that are considered to be in use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Count { get; }
|
public readonly int Count;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs an instance of <see cref="ArrayRange{T}"/>.
|
/// Constructs an instance of <see cref="ArrayRange{T}"/>.
|
||||||
|
|
|
||||||
|
|
@ -11,19 +11,19 @@ namespace Microsoft.AspNetCore.Blazor.RenderTree
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the ID of the component.
|
/// Gets the ID of the component.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ComponentId { get; }
|
public readonly int ComponentId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the changes to the render tree since a previous state.
|
/// Gets the changes to the render tree since a previous state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ArrayRange<RenderTreeEdit> Edits { get; }
|
public readonly ArrayRange<RenderTreeEdit> Edits;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets render frames that may be referenced by entries in <see cref="Edits"/>.
|
/// Gets render frames that may be referenced by entries in <see cref="Edits"/>.
|
||||||
/// For example, edit entries of type <see cref="RenderTreeEditType.PrependFrame"/>
|
/// 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.
|
/// will point to an entry in this array to specify the subtree to be prepended.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ArrayRange<RenderTreeFrame> ReferenceFrames { get; }
|
public readonly ArrayRange<RenderTreeFrame> ReferenceFrames;
|
||||||
|
|
||||||
internal RenderTreeDiff(
|
internal RenderTreeDiff(
|
||||||
int componentId,
|
int componentId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue