Skip to content

Commit 56ffc6b

Browse files
On RenderTreeBuilder, add SetUpdatesAttributeName (#11375)
1 parent 0058a58 commit 56ffc6b

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ public void OpenComponent(int sequence, System.Type componentType) { }
775775
public void OpenComponent<TComponent>(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { }
776776
public void OpenElement(int sequence, string elementName) { }
777777
public void SetKey(object value) { }
778+
public void SetUpdatesAttributeName(string updatesAttributeName) { }
778779
}
779780
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
780781
public readonly partial struct RenderTreeDiff

src/Components/Components/src/RenderTree/RenderTreeBuilder.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,24 @@ public void AddMultipleAttributes<T>(int sequence, IEnumerable<KeyValuePair<stri
516516
}
517517
}
518518

519+
/// <summary>
520+
/// <para>
521+
/// Indicates that the preceding attribute represents an event handler
522+
/// whose execution updates the attribute with name <paramref name="updatesAttributeName"/>.
523+
/// </para>
524+
/// <para>
525+
/// This information is used by the rendering system to determine whether
526+
/// to accept a value update for the other attribute when receiving a
527+
/// call to the event handler.
528+
/// </para>
529+
/// </summary>
530+
/// <param name="updatesAttributeName">The name of another attribute whose value can be updated when the event handler is executed.</param>
531+
public void SetUpdatesAttributeName(string updatesAttributeName)
532+
{
533+
// TODO: This will be implemented in a later PR, once aspnetcore-tooling
534+
// is updated to call this method.
535+
}
536+
519537
/// <summary>
520538
/// Appends a frame representing a child component.
521539
/// </summary>

0 commit comments

Comments
 (0)