From 56ffc6b58210292a18f548bf4eddff193f73a4d6 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 20 Jun 2019 09:52:12 +0200 Subject: [PATCH] On RenderTreeBuilder, add SetUpdatesAttributeName (#11375) --- ...oft.AspNetCore.Components.netstandard2.0.cs | 1 + .../src/RenderTree/RenderTreeBuilder.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs index 5ae519b840..f972cc5ecc 100644 --- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs +++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs @@ -775,6 +775,7 @@ namespace Microsoft.AspNetCore.Components.RenderTree public void OpenComponent(int sequence) where TComponent : Microsoft.AspNetCore.Components.IComponent { } public void OpenElement(int sequence, string elementName) { } public void SetKey(object value) { } + public void SetUpdatesAttributeName(string updatesAttributeName) { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RenderTreeDiff diff --git a/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs b/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs index 79290f8e07..c6ae2998f2 100644 --- a/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs +++ b/src/Components/Components/src/RenderTree/RenderTreeBuilder.cs @@ -516,6 +516,24 @@ namespace Microsoft.AspNetCore.Components.RenderTree } } + /// + /// + /// Indicates that the preceding attribute represents an event handler + /// whose execution updates the attribute with name . + /// + /// + /// This information is used by the rendering system to determine whether + /// to accept a value update for the other attribute when receiving a + /// call to the event handler. + /// + /// + /// The name of another attribute whose value can be updated when the event handler is executed. + public void SetUpdatesAttributeName(string updatesAttributeName) + { + // TODO: This will be implemented in a later PR, once aspnetcore-tooling + // is updated to call this method. + } + /// /// Appends a frame representing a child component. ///